Changeset 553492be in mainline for uspace/srv/vfs/vfs_lookup.c


Ignore:
Timestamp:
2009-06-17T22:33:08Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ac47b7c2
Parents:
ca093b3
Message:

Finish converting VFS to fibril synchronization.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/vfs/vfs_lookup.c

    rca093b3 r553492be  
    4343#include <stdarg.h>
    4444#include <bool.h>
    45 #include <futex.h>
     45#include <fibril_sync.h>
    4646#include <adt/list.h>
    4747#include <vfs/canonify.h>
     
    4949#define min(a, b)  ((a) < (b) ? (a) : (b))
    5050
    51 futex_t plb_futex = FUTEX_INITIALIZER;
     51FIBRIL_MUTEX_INITIALIZE(plb_mutex);
    5252link_t plb_head;  /**< PLB entry ring buffer. */
    5353uint8_t *plb = NULL;
     
    9393        }
    9494       
    95         futex_down(&plb_futex);
     95        fibril_mutex_lock(&plb_mutex);
    9696
    9797        plb_entry_t entry;
     
    120120                         * The buffer cannot absorb the path.
    121121                         */
    122                         futex_up(&plb_futex);
     122                        fibril_mutex_unlock(&plb_mutex);
    123123                        return ELIMIT;
    124124                }
     
    128128                         * The buffer cannot absorb the path.
    129129                         */
    130                         futex_up(&plb_futex);
     130                        fibril_mutex_unlock(&plb_mutex);
    131131                        return ELIMIT;
    132132                }
     
    147147        list_append(&entry.plb_link, &plb_head);
    148148       
    149         futex_up(&plb_futex);
     149        fibril_mutex_unlock(&plb_mutex);
    150150
    151151        /*
     
    169169        vfs_release_phone(phone);
    170170       
    171         futex_down(&plb_futex);
     171        fibril_mutex_lock(&plb_mutex);
    172172        list_remove(&entry.plb_link);
    173173        /*
     
    176176        memset(&plb[first], 0, cnt1);
    177177        memset(plb, 0, cnt2);
    178         futex_up(&plb_futex);
     178        fibril_mutex_unlock(&plb_mutex);
    179179
    180180        if ((rc == EOK) && (result)) {
Note: See TracChangeset for help on using the changeset viewer.