Changeset 2f44fafd in mainline for uspace/lib/c/generic/task.c


Ignore:
Timestamp:
2019-08-07T04:33:20Z (6 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Children:
e0e7eba
Parents:
62273d1
git-author:
Michal Koutný <xm.koutny+hos@…> (2015-10-12 21:58:23)
git-committer:
Matthieu Riolo <matthieu.riolo@…> (2019-08-07 04:33:20)
Message:

taskman: Implement task_wait API to pass all tests

  • different behavior for different wait flags
  • add locking to fibril code in taskman

Conflicts:

uspace/lib/c/generic/libc.c
uspace/lib/c/generic/task.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/task.c

    r62273d1 r2f44fafd  
    131131static errno_t task_setup_wait(task_id_t id, task_wait_t *wait)
    132132{
     133        assert(wait->flags);
    133134        async_exch_t *exch = taskman_exchange_begin();
    134135        if (exch == NULL)
     
    435436}
    436437
    437 errno_t task_retval(int val)
     438errno_t task_retval_internal(int val, bool wait_for_exit)
    438439{
    439440        async_exch_t *exch = taskman_exchange_begin();
     
    441442                return EIO;
    442443
    443         int rc = (int) async_req_1_0(exch, TASKMAN_RETVAL, val);
     444        errno_t rc = (int) async_req_2_0(exch, TASKMAN_RETVAL, val, wait_for_exit);
    444445        taskman_exchange_end(exch);
    445446       
     
    447448}
    448449
     450errno_t task_retval(int val)
     451{
     452        return task_retval_internal(val, false);
     453}
     454
    449455
    450456void __task_init(async_sess_t *sess)
Note: See TracChangeset for help on using the changeset viewer.