Changeset ab6edb6 in mainline for uspace/lib/c/generic/async/server.c
- Timestamp:
- 2018-06-26T17:34:48Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e768aea
- Parents:
- b59318e
- git-author:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-06-25 19:28:19)
- git-committer:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-06-26 17:34:48)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/async/server.c
rb59318e rab6edb6 997 997 * case, route_call() will perform the wakeup. 998 998 */ 999 fibril_switch(FIBRIL_TO_MANAGER); 1000 1001 /* 1002 * Futex is up after getting back from async_manager. 1003 * Get it again. 1004 */ 1005 futex_lock(&async_futex); 999 fibril_switch(FIBRIL_FROM_BLOCKED); 1000 1006 1001 if ((usecs) && (conn->wdata.to_event.occurred) && 1007 1002 (list_empty(&conn->msg_queue))) { … … 1143 1138 { 1144 1139 while (true) { 1145 if (fibril_switch(FIBRIL_FROM_MANAGER)) {1146 futex_unlock(&async_futex);1147 /*1148 * async_futex is always held when entering a manager1149 * fibril.1150 */1151 continue;1152 }1153 1154 1140 futex_lock(&async_futex); 1141 fibril_switch(FIBRIL_FROM_MANAGER); 1142 1143 /* 1144 * The switch only returns when there is no non-manager fibril 1145 * it can run. 1146 */ 1155 1147 1156 1148 suseconds_t timeout; … … 1226 1218 static errno_t async_manager_fibril(void *arg) 1227 1219 { 1228 futex_unlock(&async_futex);1229 1230 /*1231 * async_futex is always locked when entering manager1232 */1233 1220 async_manager_worker(); 1234 1235 1221 return 0; 1236 1222 }
Note:
See TracChangeset
for help on using the changeset viewer.