Changeset 668f8cbf in mainline


Ignore:
Timestamp:
2010-10-19T18:44:01Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3e20fd48
Parents:
a7a85d16
Message:

Add structure for tracking ownership of fibril mutexes and rwlocks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/fibril_synch.h

    ra7a85d16 r668f8cbf  
    4343
    4444typedef struct {
     45        fibril_t *owned_by;
     46} fibril_owner_info_t;
     47
     48typedef struct {
     49        fibril_owner_info_t oi;         /* Keep this the first thing. */
    4550        int counter;
    4651        link_t waiters;
     
    4954#define FIBRIL_MUTEX_INITIALIZER(name) \
    5055        { \
     56                .oi = { \
     57                        .owned_by = NULL \
     58                }, \
    5159                .counter = 1, \
    5260                .waiters = { \
     
    6068
    6169typedef struct {
     70        fibril_owner_info_t oi; /* Keep this the first thing. */
    6271        unsigned writers;
    6372        unsigned readers;
     
    6776#define FIBRIL_RWLOCK_INITIALIZER(name) \
    6877        { \
     78                .oi = { \
     79                        .owned_by = NULL \
     80                }, \
    6981                .readers = 0, \
    7082                .writers = 0, \
Note: See TracChangeset for help on using the changeset viewer.