Subversion Repositories HelenOS

Rev

Rev 4551 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4551 Rev 4566
Line 50... Line 50...
50
#include <as.h>
50
#include <as.h>
51
#include <assert.h>
51
#include <assert.h>
52
#include <atomic.h>
52
#include <atomic.h>
53
#include "vfs.h"
53
#include "vfs.h"
54
 
54
 
-
 
55
FIBRIL_CONDVAR_INITIALIZE(fs_head_cv);
55
FIBRIL_MUTEX_INITIALIZE(fs_head_lock);
56
FIBRIL_MUTEX_INITIALIZE(fs_head_lock);
56
link_t fs_head;
57
LIST_INITIALIZE(fs_head);
57
 
58
 
58
atomic_t fs_handle_next = {
59
atomic_t fs_handle_next = {
59
    .count = 1
60
    .count = 1
60
};
61
};
61
 
62
 
Line 266... Line 267...
266
     * system a global file system handle.
267
     * system a global file system handle.
267
     */
268
     */
268
    fs_info->fs_handle = (fs_handle_t) atomic_postinc(&fs_handle_next);
269
    fs_info->fs_handle = (fs_handle_t) atomic_postinc(&fs_handle_next);
269
    ipc_answer_1(rid, EOK, (ipcarg_t) fs_info->fs_handle);
270
    ipc_answer_1(rid, EOK, (ipcarg_t) fs_info->fs_handle);
270
   
271
   
271
    pending_new_fs = true;
-
 
272
    fibril_condvar_signal(&pending_cv);
272
    fibril_condvar_signal(&fs_head_cv);
273
    fibril_mutex_unlock(&fs_head_lock);
273
    fibril_mutex_unlock(&fs_head_lock);
274
   
274
   
275
    dprintf("\"%.*s\" filesystem successfully registered, handle=%d.\n",
275
    dprintf("\"%.*s\" filesystem successfully registered, handle=%d.\n",
276
        FS_NAME_MAXLEN, fs_info->vfs_info.name, fs_info->fs_handle);
276
        FS_NAME_MAXLEN, fs_info->vfs_info.name, fs_info->fs_handle);
277
}
277
}