Changeset 4ff66ae in mainline for uspace/lib/c


Ignore:
Timestamp:
2019-08-07T11:18:35Z (6 years ago)
Author:
Matthieu Riolo <matthieu.riolo@…>
Children:
87a31ef2
Parents:
bb57a00
git-author:
Michal Koutný <xm.koutny+hos@…> (2015-11-13 03:13:03)
git-committer:
Matthieu Riolo <matthieu.riolo@…> (2019-08-07 11:18:35)
Message:

taskman: Bind events dump to register handler

  • So that no events are processed twice or omitted.
Location:
uspace/lib/c
Files:
4 edited

Legend:

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

    rbb57a00 r4ff66ae  
    8383 * Blocks, calls handler in another fibril
    8484 */
    85 int task_register_event_handler(task_event_handler_t handler)
     85int task_register_event_handler(task_event_handler_t handler, bool past_events)
    8686{
    8787        /*
     
    9595
    9696        async_exch_t *exch = taskman_exchange_begin();
    97         aid_t req = async_send_0(exch, TASKMAN_EVENT_CALLBACK, NULL);
     97        aid_t req = async_send_1(exch, TASKMAN_EVENT_CALLBACK, past_events, NULL);
    9898
    9999        int rc = async_connect_to_me(exch, 0, 0, 0, taskman_event_conn, NULL);
  • uspace/lib/c/generic/taskman.c

    rbb57a00 r4ff66ae  
    127127 */
    128128
    129 int 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 
    140129async_sess_t *taskman_get_session(void)
    141130{
  • uspace/lib/c/include/ipc/taskman.h

    rbb57a00 r4ff66ae  
    4444        TASKMAN_EVENT_CALLBACK,
    4545        TASKMAN_NEW_TASK,
    46         TASKMAN_I_AM_NS,
    47         TASKMAN_DUMP_EVENTS
     46        TASKMAN_I_AM_NS
    4847} taskman_request_t;
    4948
  • uspace/lib/c/include/taskman.h

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