Changeset 8119363 in mainline for uspace/lib/c/generic/async/client.c
- Timestamp:
- 2018-06-26T17:35:40Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6e569bf
- Parents:
- fbfe59d (diff), e768aea (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/async/client.c
rfbfe59d r8119363 121 121 #include <abi/mm/as.h> 122 122 #include "../private/libc.h" 123 #include "../private/fibril.h" 123 124 124 125 /** Naming service session */ … … 241 242 assert(arg); 242 243 243 futex_ down(&async_futex);244 futex_lock(&async_futex); 244 245 245 246 amsg_t *msg = (amsg_t *) arg; … … 266 267 } 267 268 268 futex_u p(&async_futex);269 futex_unlock(&async_futex); 269 270 } 270 271 … … 355 356 amsg_t *msg = (amsg_t *) amsgid; 356 357 357 futex_ down(&async_futex);358 futex_lock(&async_futex); 358 359 359 360 assert(!msg->forget); … … 361 362 362 363 if (msg->done) { 363 futex_u p(&async_futex);364 futex_unlock(&async_futex); 364 365 goto done; 365 366 } … … 370 371 371 372 /* Leave the async_futex locked when entering this function */ 372 fibril_switch(FIBRIL_TO_MANAGER); 373 374 /* Futex is up automatically after fibril_switch */ 373 fibril_switch(FIBRIL_FROM_BLOCKED); 374 futex_unlock(&async_futex); 375 375 376 376 done: … … 401 401 amsg_t *msg = (amsg_t *) amsgid; 402 402 403 futex_ down(&async_futex);403 futex_lock(&async_futex); 404 404 405 405 assert(!msg->forget); … … 407 407 408 408 if (msg->done) { 409 futex_u p(&async_futex);409 futex_unlock(&async_futex); 410 410 goto done; 411 411 } … … 443 443 444 444 /* Leave the async_futex locked when entering this function */ 445 fibril_switch(FIBRIL_TO_MANAGER); 446 447 /* Futex is up automatically after fibril_switch */ 445 fibril_switch(FIBRIL_FROM_BLOCKED); 446 futex_unlock(&async_futex); 448 447 449 448 if (!msg->done) … … 475 474 assert(!msg->destroyed); 476 475 477 futex_ down(&async_futex);476 futex_lock(&async_futex); 478 477 479 478 if (msg->done) { … … 484 483 } 485 484 486 futex_u p(&async_futex);485 futex_unlock(&async_futex); 487 486 } 488 487 … … 504 503 tv_add_diff(&awaiter.to_event.expires, timeout); 505 504 506 futex_ down(&async_futex);505 futex_lock(&async_futex); 507 506 508 507 async_insert_timeout(&awaiter); 509 508 510 509 /* Leave the async_futex locked when entering this function */ 511 fibril_switch(FIBRIL_TO_MANAGER); 512 513 /* Futex is up automatically after fibril_switch() */ 510 fibril_switch(FIBRIL_FROM_BLOCKED); 511 futex_unlock(&async_futex); 514 512 } 515 513
Note:
See TracChangeset
for help on using the changeset viewer.