Changeset 5cd2290 in mainline for uspace/srv/taskman/main.c
- Timestamp:
- 2019-08-07T05:35:46Z (6 years ago)
- Children:
- b22b0a94
- Parents:
- 1fb4a49
- git-author:
- Michal Koutný <xm.koutny+hos@…> (2015-10-18 10:53:14)
- git-committer:
- Matthieu Riolo <matthieu.riolo@…> (2019-08-07 05:35:46)
- File:
-
- 1 edited
-
uspace/srv/taskman/main.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/taskman/main.c
r1fb4a49 r5cd2290 122 122 static void task_exit_event(ipc_callid_t iid, ipc_call_t *icall, void *arg) 123 123 { 124 // TODO design substitution for taskmon (monitoring)125 124 task_id_t id = MERGE_LOUP32(IPC_GET_ARG1(*icall), IPC_GET_ARG2(*icall)); 126 printf("%s:%i from %llu/%i\n", __func__, __LINE__, id, (task_exit_t)arg); 127 task_terminated(id, (task_exit_t)arg); 125 exit_reason_t exit_reason = IPC_GET_ARG3(*icall); 126 printf("%s:%i from %llu/%i\n", __func__, __LINE__, id, exit_reason); 127 task_terminated(id, exit_reason); 128 } 129 130 static void task_fault_event(ipc_callid_t iid, ipc_call_t *icall, void *arg) 131 { 132 task_id_t id = MERGE_LOUP32(IPC_GET_ARG1(*icall), IPC_GET_ARG2(*icall)); 133 printf("%s:%i from %llu\n", __func__, __LINE__, id); 134 task_failed(id); 128 135 } 129 136 … … 254 261 } 255 262 256 rc = async_event_subscribe(EVENT_EXIT, task_exit_event, (void *)TASK_EXIT_NORMAL);263 rc = async_event_subscribe(EVENT_EXIT, task_exit_event, NULL); 257 264 if (rc != EOK) { 258 265 printf("Cannot register for exit events (%i).\n", rc); … … 260 267 } 261 268 262 rc = async_event_subscribe(EVENT_FAULT, task_ exit_event, (void *)TASK_EXIT_UNEXPECTED);269 rc = async_event_subscribe(EVENT_FAULT, task_fault_event, NULL); 263 270 if (rc != EOK) { 264 271 printf("Cannot register for fault events (%i).\n", rc);
Note:
See TracChangeset
for help on using the changeset viewer.
