Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 3612 → Rev 3611

/branches/tracing/uspace/app/tester/loop/loop1.def
File deleted
/branches/tracing/uspace/app/tester/loop/loop1.c
File deleted
/branches/tracing/uspace/app/tester/Makefile
54,7 → 54,6
ipc/send_sync.c \
ipc/answer.c \
ipc/hangup.c \
loop/loop1.c \
devmap/devmap1.c \
vfs/vfs1.c \
debug/debug1.c
/branches/tracing/uspace/app/tester/tester.c
56,7 → 56,6
#include "ipc/answer.def"
#include "ipc/hangup.def"
#include "devmap/devmap1.def"
#include "loop/loop1.def"
#include "vfs/vfs1.def"
#include "debug/debug1.def"
{NULL, NULL, NULL}
/branches/tracing/uspace/app/tester/tester.h
69,7 → 69,6
extern char * test_answer(bool quiet);
extern char * test_hangup(bool quiet);
extern char * test_devmap1(bool quiet);
extern char * test_loop1(bool quiet);
extern char * test_vfs1(bool quiet);
extern char * test_debug1(bool quiet);
 
/branches/tracing/uspace/srv/fs/fat/fat.h
204,7 → 204,6
extern void fat_write(ipc_callid_t, ipc_call_t *);
extern void fat_truncate(ipc_callid_t, ipc_call_t *);
 
extern fat_idx_t *fat_idx_get_new(dev_handle_t);
extern fat_idx_t *fat_idx_get_by_pos(dev_handle_t, fat_cluster_t, unsigned);
extern fat_idx_t *fat_idx_get_by_index(dev_handle_t, fs_index_t);
 
/branches/tracing/uspace/srv/fs/fat/fat_ops.c
234,61 → 234,22
static void fat_node_put(void *node)
{
fat_node_t *nodep = (fat_node_t *)node;
bool destroy = false;
 
futex_down(&nodep->lock);
if (!--nodep->refcnt) {
if (nodep->idx) {
futex_down(&ffn_futex);
list_append(&nodep->ffn_link, &ffn_head);
futex_up(&ffn_futex);
} else {
/*
* The node does not have any index structure associated
* with itself. This can only mean that we are releasing
* the node after a failed attempt to allocate the index
* structure for it.
*/
destroy = true;
}
futex_down(&ffn_futex);
list_append(&nodep->ffn_link, &ffn_head);
futex_up(&ffn_futex);
}
futex_up(&nodep->lock);
if (destroy)
free(node);
}
 
static void *fat_create_node(dev_handle_t dev_handle, int flags)
static void *fat_create(dev_handle_t dev_handle, int flags)
{
fat_idx_t *idxp;
fat_node_t *nodep;
 
nodep = fat_node_get_new();
if (!nodep)
return NULL;
idxp = fat_idx_get_new(dev_handle);
if (!idxp) {
fat_node_put(nodep);
return NULL;
}
/* idxp->lock held */
if (flags & L_DIRECTORY) {
nodep->type = FAT_DIRECTORY;
} else {
nodep->type = FAT_FILE;
}
nodep->size = 0;
nodep->firstc = FAT_CLST_RES0;
nodep->lnkcnt = 0; /* not linked anywhere */
nodep->refcnt = 1;
 
nodep->idx = idxp;
idxp->nodep = nodep;
 
futex_up(&idxp->lock);
return nodep;
return NULL; /* not supported at the moment */
}
 
static int fat_destroy_node(void *node)
static int fat_destroy(void *node)
{
return ENOTSUP; /* not supported at the moment */
}
463,8 → 424,8
.match = fat_match,
.node_get = fat_node_get,
.node_put = fat_node_put,
.create = fat_create_node,
.destroy = fat_destroy_node,
.create = fat_create,
.destroy = fat_destroy,
.link = fat_link,
.unlink = fat_unlink,
.index_get = fat_index_get,