Changeset c028b22 in mainline for uspace/srv/vfs/vfs_lookup.c


Ignore:
Timestamp:
2011-07-08T17:01:01Z (13 years ago)
Author:
Martin Sucha <sucha14@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
cc1a727
Parents:
4e36219 (diff), 026793d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes

File:
1 edited

Legend:

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

    r4e36219 rc028b22  
    5050
    5151FIBRIL_MUTEX_INITIALIZE(plb_mutex);
    52 LIST_INITIALIZE(plb_head);      /**< PLB entry ring buffer. */
     52LIST_INITIALIZE(plb_entries);   /**< PLB entry ring buffer. */
    5353uint8_t *plb = NULL;
    5454
     
    102102        size_t last;    /* the last free index */
    103103
    104         if (list_empty(&plb_head)) {
     104        if (list_empty(&plb_entries)) {
    105105                first = 0;
    106106                last = PLB_SIZE - 1;
    107107        } else {
    108                 plb_entry_t *oldest = list_get_instance(plb_head.next,
    109                     plb_entry_t, plb_link);
    110                 plb_entry_t *newest = list_get_instance(plb_head.prev,
    111                     plb_entry_t, plb_link);
     108                plb_entry_t *oldest = list_get_instance(
     109                    list_first(&plb_entries), plb_entry_t, plb_link);
     110                plb_entry_t *newest = list_get_instance(
     111                    list_last(&plb_entries), plb_entry_t, plb_link);
    112112
    113113                first = (newest->index + newest->len) % PLB_SIZE;
     
    145145         * buffer.
    146146         */
    147         list_append(&entry.plb_link, &plb_head);
     147        list_append(&entry.plb_link, &plb_entries);
    148148       
    149149        fibril_mutex_unlock(&plb_mutex);
     
    159159
    160160        ipc_call_t answer;
    161         int phone = vfs_grab_phone(root->fs_handle);
    162         aid_t req = async_send_5(phone, VFS_OUT_LOOKUP, (sysarg_t) first,
     161        async_exch_t *exch = vfs_exchange_grab(root->fs_handle);
     162        aid_t req = async_send_5(exch, VFS_OUT_LOOKUP, (sysarg_t) first,
    163163            (sysarg_t) (first + len - 1) % PLB_SIZE,
    164164            (sysarg_t) root->devmap_handle, (sysarg_t) lflag, (sysarg_t) index,
     
    167167        sysarg_t rc;
    168168        async_wait_for(req, &rc);
    169         vfs_release_phone(root->fs_handle, phone);
     169        vfs_exchange_release(exch);
    170170       
    171171        fibril_mutex_lock(&plb_mutex);
     
    208208int vfs_open_node_internal(vfs_lookup_res_t *result)
    209209{
    210         int phone = vfs_grab_phone(result->triplet.fs_handle);
     210        async_exch_t *exch = vfs_exchange_grab(result->triplet.fs_handle);
    211211       
    212212        ipc_call_t answer;
    213         aid_t req = async_send_2(phone, VFS_OUT_OPEN_NODE,
     213        aid_t req = async_send_2(exch, VFS_OUT_OPEN_NODE,
    214214            (sysarg_t) result->triplet.devmap_handle,
    215215            (sysarg_t) result->triplet.index, &answer);
     
    217217        sysarg_t rc;
    218218        async_wait_for(req, &rc);
    219         vfs_release_phone(result->triplet.fs_handle, phone);
     219        vfs_exchange_release(exch);
    220220       
    221221        if (rc == EOK) {
Note: See TracChangeset for help on using the changeset viewer.