Changeset 8e13bfa in mainline


Ignore:
Timestamp:
2009-06-10T18:49:37Z (15 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0d3b9474
Parents:
0e31a2b
Message:

Synchronize access to pending_req.

File:
1 edited

Legend:

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

    r0e31a2b r8e13bfa  
    6767} pending_req_t;
    6868
     69FIBRIL_MUTEX_INITIALIZE(pending_lock);
    6970LIST_INITIALIZE(pending_req);
    7071
     
    264265       
    265266loop:
     267        fibril_mutex_lock(&pending_lock);
    266268        for (cur = pending_req.next; cur != &pending_req; cur = cur->next) {
    267269                pending_req_t *pr = list_get_instance(cur, pending_req_t, link);
    268                
     270
    269271                fs_handle_t fs_handle = fs_name_to_handle(pr->fs_name, true);
    270272                if (!fs_handle)
     
    283285                list_remove(cur);
    284286                free(pr);
     287                fibril_mutex_unlock(&pending_lock);
     288                fibril_yield();
    285289                goto loop;
    286290        }
     291        fibril_mutex_unlock(&pending_lock);
    287292}
    288293
     
    463468                        pr->dev_handle = dev_handle;
    464469                        link_initialize(&pr->link);
     470                        fibril_mutex_lock(&pending_lock);
    465471                        list_append(&pr->link, &pending_req);
     472                        fibril_mutex_unlock(&pending_lock);
    466473                        return;
    467474                }
Note: See TracChangeset for help on using the changeset viewer.