Changeset b2f05e2 in mainline for uspace/lib/c


Ignore:
Timestamp:
2020-01-09T06:27:27Z (6 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Children:
8a74512
Parents:
33c5626
git-author:
Matthieu Riolo <matthieu.riolo@…> (2020-01-09 02:56:12)
git-committer:
Matthieu Riolo <matthieu.riolo@…> (2020-01-09 06:27:27)
Message:

Clean up taskman fallback handler

In the previous commits the handler has corrected but it left
behind a mess. This commit cleans up the code by using the
simplified function from async library

Location:
uspace/lib/c
Files:
2 edited

Legend:

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

    r33c5626 rb2f05e2  
    132132{
    133133        async_exch_t *exch = taskman_exchange_begin();
    134         errno_t rc = async_connect_to_me(exch, INTERFACE_ANY, TASKMAN_LOADER_CALLBACK, 0);
     134        aid_t req = async_send_0(exch, TASKMAN_I_AM_LOADER, NULL);
     135
     136        errno_t rc = async_connect_to_me(exch, INTERFACE_ANY, 0, 0);
    135137        taskman_exchange_end(exch);
    136138
    137         return rc;
     139        if (rc != EOK) {
     140                async_forget(req);
     141                return rc;
     142        }
     143
     144        errno_t retval;
     145        async_wait_for(req, &retval);
     146        return retval;
    138147}
    139148
  • uspace/lib/c/include/ipc/taskman.h

    r33c5626 rb2f05e2  
    4343        TASKMAN_EVENT_CALLBACK,
    4444        TASKMAN_NEW_TASK,
     45
    4546        TASKMAN_I_AM_NS,
     47        TASKMAN_I_AM_LOADER,
    4648
    4749        TASKMAN_CONNECT_TO_NS,
    48         TASKMAN_CONNECT_TO_LOADER,
    49         TASKMAN_LOADER_CALLBACK
     50        TASKMAN_CONNECT_TO_LOADER
    5051} taskman_request_t;
    5152
Note: See TracChangeset for help on using the changeset viewer.