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


Ignore:
Timestamp:
2009-06-17T22:33:08Z (15 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_ops.c

    rca093b3 r553492be  
    4444#include <string.h>
    4545#include <bool.h>
    46 #include <futex.h>
    4746#include <fibril_sync.h>
    4847#include <adt/list.h>
     
    11321131         */
    11331132        vfs_node_t *node = vfs_node_get(&lr);
    1134         futex_down(&nodes_futex);
     1133        fibril_mutex_lock(&nodes_mutex);
    11351134        node->lnkcnt--;
    1136         futex_up(&nodes_futex);
     1135        fibril_mutex_unlock(&nodes_mutex);
    11371136        fibril_rwlock_write_unlock(&namespace_rwlock);
    11381137        vfs_node_put(node);
     
    12831282                        return;
    12841283                }
    1285                 futex_down(&nodes_futex);
     1284                fibril_mutex_lock(&nodes_mutex);
    12861285                new_node->lnkcnt--;
    1287                 futex_up(&nodes_futex);
     1286                fibril_mutex_unlock(&nodes_mutex);
    12881287                break;
    12891288        default:
     
    13051304                return;
    13061305        }
    1307         futex_down(&nodes_futex);
     1306        fibril_mutex_lock(&nodes_mutex);
    13081307        old_node->lnkcnt++;
    1309         futex_up(&nodes_futex);
     1308        fibril_mutex_unlock(&nodes_mutex);
    13101309        /* Destroy the link for the old name. */
    13111310        rc = vfs_lookup_internal(oldc, L_UNLINK, NULL, NULL);
     
    13201319                return;
    13211320        }
    1322         futex_down(&nodes_futex);
     1321        fibril_mutex_lock(&nodes_mutex);
    13231322        old_node->lnkcnt--;
    1324         futex_up(&nodes_futex);
     1323        fibril_mutex_unlock(&nodes_mutex);
    13251324        fibril_rwlock_write_unlock(&namespace_rwlock);
    13261325        vfs_node_put(old_node);
Note: See TracChangeset for help on using the changeset viewer.