Changeset 3e20fd48 in mainline


Ignore:
Timestamp:
2010-10-19T18:47:03Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7f122e3
Parents:
668f8cbf
Message:

Record the ownership tracking info for fibril mutexes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/fibril_synch.c

    r668f8cbf r3e20fd48  
    5858void fibril_mutex_initialize(fibril_mutex_t *fm)
    5959{
     60        fm->oi.owned_by = NULL;
    6061        fm->counter = 1;
    6162        list_initialize(&fm->waiters);
     
    7576                fibril_switch(FIBRIL_TO_MANAGER);
    7677        } else {
     78                fm->oi.owned_by = (fibril_t *) fibril_get_id();
    7779                futex_up(&async_futex);
    7880        }
     
    8688        if (fm->counter > 0) {
    8789                fm->counter--;
     90                fm->oi.owned_by = (fibril_t *) fibril_get_id();
    8891                locked = true;
    8992        }
     
    105108                wdp->active = true;
    106109                wdp->wu_event.inlist = false;
     110                fm->oi.owned_by = (fibril_t *) wdp->fid;
    107111                list_remove(&wdp->wu_event.link);
    108112                fibril_add_ready(wdp->fid);
    109113                optimize_execution_power();
     114        } else {
     115                fm->oi.owned_by = NULL;
    110116        }
    111117}
     
    120126void fibril_rwlock_initialize(fibril_rwlock_t *frw)
    121127{
     128        frw->oi.owned_by = NULL;
    122129        frw->writers = 0;
    123130        frw->readers = 0;
Note: See TracChangeset for help on using the changeset viewer.