Changeset 4ff66ae in mainline for uspace/srv/taskman/main.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.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/taskman/main.c

    rbb57a00 r4ff66ae  
    186186        DPRINTF("%s:%i from %llu\n", __func__, __LINE__, icall->in_task_id);
    187187
     188        bool past_events = IPC_GET_ARG1(*icall);
     189
    188190        /* Atomic -- will be used for notifications only */
    189191        async_sess_t *sess = async_callback_receive(EXCHANGE_ATOMIC);
     
    193195        }
    194196
    195         int rc = event_register_listener(icall->in_task_id, sess);
    196         async_answer_0(iid, rc);
    197 }
    198 
    199 static void taskman_ctl_dump_events(ipc_callid_t iid, ipc_call_t *icall)
    200 {
    201         DPRINTF("%s:%i from %llu\n", __func__, __LINE__, icall->in_task_id);
    202 
    203         dump_events(icall->in_task_id, iid);
     197        event_register_listener(icall->in_task_id, past_events, sess, iid);
    204198}
    205199
     
    263257                taskman_ctl_ev_callback(iid, icall);
    264258                break;
    265         case TASKMAN_DUMP_EVENTS:
    266                 taskman_ctl_dump_events(iid, icall);
    267                 break;
    268259        default:
    269260                return false;
     
    274265static bool handle_implicit_call(ipc_callid_t iid, ipc_call_t *icall)
    275266{
    276         DPRINTF("%s:%i %i(%i) from %llu\n", __func__, __LINE__,
     267        /*DPRINTF("%s:%i %i(%i) from %llu\n", __func__, __LINE__,
    277268            IPC_GET_IMETHOD(*icall),
    278269            IPC_GET_ARG1(*icall),
    279             icall->in_task_id);
     270            icall->in_task_id);*/
    280271
    281272        if (IPC_GET_IMETHOD(*icall) < IPC_FIRST_USER_METHOD) {
Note: See TracChangeset for help on using the changeset viewer.