Changeset 8619f25 in mainline for uspace/lib/libc/generic/fibril_sync.c
- Timestamp:
- 2009-08-21T07:25:50Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 207e208e
- Parents:
- 057d21a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/generic/fibril_sync.c
r057d21a r8619f25 40 40 #include <assert.h> 41 41 42 static void optimize_execution_power(void) 43 { 44 /* 45 * When waking up a worker fibril previously blocked in fibril 46 * synchronization, chances are that there is an idle manager fibril 47 * waiting for IPC, that could start executing the awakened worker 48 * fibril right away. We try to detect this and bring the manager 49 * fibril back to fruitful work. 50 */ 51 if (atomic_get(&threads_in_ipc_wait) > 0) 52 ipc_poke(); 53 } 54 42 55 void fibril_mutex_initialize(fibril_mutex_t *fm) 43 56 { … … 84 97 list_remove(&f->link); 85 98 fibril_add_ready((fid_t) f); 99 optimize_execution_power(); 86 100 } 87 101 } … … 152 166 fibril_add_ready((fid_t) f); 153 167 frw->writers++; 168 optimize_execution_power(); 154 169 break; 155 170 } else { … … 157 172 fibril_add_ready((fid_t) f); 158 173 frw->readers++; 174 optimize_execution_power(); 159 175 } 160 176 } … … 200 216 list_remove(&f->link); 201 217 fibril_add_ready((fid_t) f); 218 optimize_execution_power(); 202 219 if (once) 203 220 break;
Note:
See TracChangeset
for help on using the changeset viewer.