Changeset 4667b5c in mainline for uspace/lib


Ignore:
Timestamp:
2019-08-07T11:10:46Z (7 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Children:
bb57a00
Parents:
130ba46
git-author:
Michal Koutný <xm.koutny+hos@…> (2015-11-13 01:56:10)
git-committer:
Matthieu Riolo <matthieu.riolo@…> (2019-08-07 11:10:46)
Message:

taskman: Add method to dump events of already running tasks

It's crafted for early startup of sysman.

Location:
uspace/lib/c
Files:
3 edited

Legend:

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

    r130ba46 r4667b5c  
    4545
    4646async_sess_t *session_taskman = NULL;
     47
     48/*
     49 * Private functions
     50 */
    4751
    4852void __task_init(async_sess_t *sess)
     
    119123}
    120124
     125/*
     126 * Public functions
     127 */
     128
     129int taskman_dump_events(void)
     130{
     131        assert(session_taskman);
     132
     133        async_exch_t *exch = async_exchange_begin(session_taskman);
     134        int rc = async_req_0_0(exch, TASKMAN_DUMP_EVENTS);
     135        taskman_exchange_end(exch);
     136
     137        return rc;
     138}
     139
     140async_sess_t *taskman_get_session(void)
     141{
     142        return session_taskman;
     143}
     144
    121145/** Introduce as loader to taskman
    122146 *
     
    158182}
    159183
    160 async_sess_t *taskman_get_session(void)
    161 {
    162         return session_taskman;
    163 }
    164 
    165184
    166185
  • uspace/lib/c/include/ipc/taskman.h

    r130ba46 r4667b5c  
    4444        TASKMAN_EVENT_CALLBACK,
    4545        TASKMAN_NEW_TASK,
    46         TASKMAN_I_AM_NS
     46        TASKMAN_I_AM_NS,
     47        TASKMAN_DUMP_EVENTS
    4748} taskman_request_t;
    4849
  • uspace/lib/c/include/taskman.h

    r130ba46 r4667b5c  
    4040#endif
    4141
     42extern int taskman_dump_events(void);
     43
    4244/* Internal functions to be used by loader only */
    4345#ifndef TASKMAN_DISABLE_ASYNC
Note: See TracChangeset for help on using the changeset viewer.