Changeset 9413c0d in mainline for uspace/srv/vfs/vfs.h


Ignore:
Timestamp:
2008-01-06T12:50:51Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b3c38750
Parents:
f57f8ea
Message:

Add basic rwlock API for uspace so that VFS can be designed/implemented using
this API. So far, the implementation of this API merely wraps futexes into
rwlocks. Real rwlocks are wanted by ticket #54.

Using the new rwlock API, replace the VFS node content futex with an rwlock.
Lock the contents rwlock as reader on reads and as writer on writes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/vfs/vfs.h

    rf57f8ea r9413c0d  
    3737#include <libadt/list.h>
    3838#include <atomic.h>
     39#include <rwlock.h>
    3940#include <sys/types.h>
    4041#include <bool.h>
     
    136137        link_t nh_link;         /**< Node hash-table link. */
    137138
    138         /** Holding this futex prevents modifications of the node's contents. */
    139         atomic_t contents_futex;
     139        /** Holding this rwlock prevents modifications of the node's contents. */
     140        atomic_t contents_rwlock;
    140141} vfs_node_t;
    141142
Note: See TracChangeset for help on using the changeset viewer.