Changeset 9413c0d in mainline for uspace/srv/vfs/vfs_node.c


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_node.c

    rf57f8ea r9413c0d  
    4141#include <atomic.h>
    4242#include <futex.h>
     43#include <rwlock.h>
    4344#include <libadt/hash_table.h>
    4445
     
    147148                node->index = triplet->index;
    148149                link_initialize(&node->nh_link);
    149                 futex_initialize(&node->contents_futex, 1);
     150                rwlock_initialize(&node->contents_rwlock);
    150151                hash_table_insert(&nodes, key, &node->nh_link);
    151152        } else {
Note: See TracChangeset for help on using the changeset viewer.