Changeset 3e20fd48 in mainline
- Timestamp:
- 2010-10-19T18:47:03Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7f122e3
- Parents:
- 668f8cbf
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/fibril_synch.c
r668f8cbf r3e20fd48 58 58 void fibril_mutex_initialize(fibril_mutex_t *fm) 59 59 { 60 fm->oi.owned_by = NULL; 60 61 fm->counter = 1; 61 62 list_initialize(&fm->waiters); … … 75 76 fibril_switch(FIBRIL_TO_MANAGER); 76 77 } else { 78 fm->oi.owned_by = (fibril_t *) fibril_get_id(); 77 79 futex_up(&async_futex); 78 80 } … … 86 88 if (fm->counter > 0) { 87 89 fm->counter--; 90 fm->oi.owned_by = (fibril_t *) fibril_get_id(); 88 91 locked = true; 89 92 } … … 105 108 wdp->active = true; 106 109 wdp->wu_event.inlist = false; 110 fm->oi.owned_by = (fibril_t *) wdp->fid; 107 111 list_remove(&wdp->wu_event.link); 108 112 fibril_add_ready(wdp->fid); 109 113 optimize_execution_power(); 114 } else { 115 fm->oi.owned_by = NULL; 110 116 } 111 117 } … … 120 126 void fibril_rwlock_initialize(fibril_rwlock_t *frw) 121 127 { 128 frw->oi.owned_by = NULL; 122 129 frw->writers = 0; 123 130 frw->readers = 0;
Note:
See TracChangeset
for help on using the changeset viewer.