Changeset b22b0a94 in mainline for uspace/lib/c
- Timestamp:
- 2019-08-07T05:39:54Z (6 years ago)
- Children:
- b8341bc
- Parents:
- 5cd2290
- git-author:
- Michal Koutný <xm.koutny+hos@…> (2015-10-19 21:34:52)
- git-committer:
- Matthieu Riolo <matthieu.riolo@…> (2019-08-07 05:39:54)
- Location:
- uspace/lib/c
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/task.c
r5cd2290 rb22b0a94 3 3 * Copyright (c) 2008 Jiri Svoboda 4 4 * Copyright (c) 2014 Martin Sucha 5 * Copyright (c) 2015 Michal Koutny 5 6 * All rights reserved. 6 7 * … … 53 54 54 55 static async_sess_t *session_taskman = NULL; 56 static task_event_handler_t task_event_handler = NULL; 55 57 56 58 task_id_t task_get_id(void) … … 470 472 } 471 473 474 void task_set_event_handler(task_event_handler_t handler) 475 { 476 task_event_handler = handler; 477 // TODO implement logic for calling the handler 478 } 472 479 473 480 void __task_init(async_sess_t *sess) -
uspace/lib/c/include/task.h
r5cd2290 rb22b0a94 46 46 #define TASK_WAIT_BOTH 0x4 47 47 48 typedef struct {49 int flags;50 ipc_call_t result;51 aid_t aid;52 task_id_t tid;53 } task_wait_t;54 55 48 static inline void task_wait_set(task_wait_t *wait, int flags) 56 49 { … … 76 69 __attribute__((sentinel)); 77 70 78 // if there is possibility for further wait, modify task_wait79 71 extern errno_t task_wait(task_wait_t *, task_exit_t *, int *); 80 72 extern errno_t task_wait_task_id(task_id_t, int, task_exit_t *, int *); 81 // similar to listen and socket duplication82 extern errno_t task_wait_any(task_wait_t *, task_id_t *, task_exit_t *, int *,83 task_wait_t *);84 85 //extern int task_wait_any(int, task_exit_t *, int *);86 // alternative87 // task_wait_t is output param, actual result is obtained via task_wait call88 //extern int task_wait_any(task_wait_t *, int);89 73 90 74 extern void task_cancel_wait(task_wait_t *); 91 75 92 76 extern errno_t task_retval(int); 77 extern void task_set_event_handler(task_event_handler_t); 93 78 94 79 #endif -
uspace/lib/c/include/types/task.h
r5cd2290 rb22b0a94 42 42 } task_exit_t; 43 43 44 typedef struct { 45 int flags; 46 ipc_call_t result; 47 aid_t aid; 48 task_id_t tid; 49 } task_wait_t; 50 51 typedef void (* task_event_handler_t)(task_id_t, int, task_exit_t, int); 52 44 53 #endif 45 54
Note:
See TracChangeset
for help on using the changeset viewer.