Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 7114d83 in mainline for uspace/lib/libc/generic/task.c


Ignore:
Timestamp:
2009-07-06T16:02:27Z (12 years ago)
Author:
Jiri Svoboda <jirik.svoboda@…>
Branches:
lfn, master
Children:
5d96851
Parents:
d68e4d5
Message:

Allow task to return value (will be improved).

File:
1 edited

Legend:

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

    rd68e4d5 r7114d83  
    149149}
    150150
    151 int task_wait(task_id_t id)
     151int task_wait(task_id_t id, int *retval)
    152152{
    153         return (int) async_req_2_0(PHONE_NS, NS_TASK_WAIT, LOWER32(id), UPPER32(id));
     153        ipcarg_t rv;
     154        int rc;
     155
     156        rc = (int) async_req_2_1(PHONE_NS, NS_TASK_WAIT, LOWER32(id),
     157            UPPER32(id), &rv);
     158        *retval = rv;
     159
     160        return rc;
     161}
     162
     163int task_retval(int val)
     164{
     165        task_id_t id;
     166
     167        id = task_get_id();
     168        return (int) async_req_3_0(PHONE_NS, NS_RETVAL, LOWER32(id),
     169            UPPER32(id), val);
    154170}
    155171
Note: See TracChangeset for help on using the changeset viewer.