Changeset 7b616e2 in mainline for uspace/lib/c/generic/task.c


Ignore:
Timestamp:
2017-09-27T22:40:09Z (7 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d076f16
Parents:
8d6bcc8c
Message:

Name service should communicate using async.h.

File:
1 edited

Legend:

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

    r8d6bcc8c r7b616e2  
    4444#include <async.h>
    4545#include <errno.h>
     46#include <ns.h>
    4647#include <malloc.h>
    4748#include <libc.h>
     
    324325int task_setup_wait(task_id_t id, task_wait_t *wait)
    325326{
    326         async_exch_t *exch = async_exchange_begin(session_ns);
     327        async_sess_t *sess_ns = ns_session_get();
     328        if (sess_ns == NULL)
     329                return EIO;
     330
     331        async_exch_t *exch = async_exchange_begin(sess_ns);
    327332        wait->aid = async_send_2(exch, NS_TASK_WAIT, LOWER32(id), UPPER32(id),
    328333            &wait->result);
     
    401406int task_retval(int val)
    402407{
    403         async_exch_t *exch = async_exchange_begin(session_ns);
     408        async_sess_t *sess_ns = ns_session_get();
     409        if (sess_ns == NULL)
     410                return EIO;
     411
     412        async_exch_t *exch = async_exchange_begin(sess_ns);
    404413        int rc = (int) async_req_1_0(exch, NS_RETVAL, val);
    405414        async_exchange_end(exch);
Note: See TracChangeset for help on using the changeset viewer.