Changeset 0b99e40 in mainline for libc/generic/async.c
- Timestamp:
- 2006-05-28T18:22:10Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2d1fde3b
- Parents:
- 7f5b37a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libc/generic/async.c
r7f5b37a r0b99e40 332 332 ipc_call_t call; 333 333 ipc_callid_t callid; 334 int timeout; 334 335 335 336 while (1) { … … 340 341 continue; 341 342 } 342 callid = ipc_wait_cycle(&call,SYNCH_NO_TIMEOUT,SYNCH_BLOCKING); 343 /* 344 if (expires) 345 timeout = .... ; 346 else 347 */ 348 timeout = SYNCH_NO_TIMEOUT; 349 callid = ipc_wait_cycle(&call, timeout, SYNCH_BLOCKING); 350 351 if (!callid) { 352 // handle_expired_timeouts.......; 353 continue; 354 } 343 355 344 356 if (callid & IPC_CALLID_ANSWERED) … … 405 417 if (msg->dataptr) 406 418 *msg->dataptr = *data; 407 419 420 /* TODO: memory barrier?? */ 408 421 msg->done = 1; 409 422 if (! msg->active) { … … 461 474 free(msg); 462 475 } 476 477 478 /* int async_wait_timeout(aid_t amsgid, ipcarg_t *retval, int timeout) */ 479 /* { */ 480 /* amsg_t *msg = (amsg_t *) amsgid; */ 481 /* connection_t *conn; */ 482 483 /* futex_down(&async_futex); */ 484 /* if (msg->done) { */ 485 /* futex_up(&async_futex); */ 486 /* goto done; */ 487 /* } */ 488 489 /* msg->ptid = psthread_get_id(); */ 490 /* msg->active = 0; */ 491 /* msg->expires = gettime() + timeout; */ 492 /* setup_timeouts_etc...(); */ 493 494 /* /\* Leave locked async_futex when entering this function *\/ */ 495 /* psthread_schedule_next_adv(PS_TO_MANAGER); */ 496 /* /\* futex is up automatically after psthread_schedule_next...*\/ */ 497 498 /* if (!msg->done) */ 499 /* return casy-casy; */ 500 501 /* /\* TODO: When memory barrier in reply_received, we can skip this *\/ */ 502 /* futex_down(&async_futex); */ 503 /* futex_up(&async_futex); */ 504 /* done: */ 505 506 /* if (retval) */ 507 /* *retval = msg->retval; */ 508 /* free(msg); */ 509 /* } */ 510
Note:
See TracChangeset
for help on using the changeset viewer.