Changeset 035d7d8 in mainline for uspace/srv/taskman/task.h
- Timestamp:
- 2019-08-07T05:49:44Z (6 years ago)
- Children:
- 2aaccd3
- Parents:
- 456f7ae
- git-author:
- Michal Koutný <xm.koutny+hos@…> (2015-10-21 22:44:26)
- git-committer:
- Matthieu Riolo <matthieu.riolo@…> (2019-08-07 05:49:44)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/taskman/task.h
r456f7ae r035d7d8 35 35 #define TASKMAN_TASK_H__ 36 36 37 #include <abi/proc/task.h> 38 #include <adt/hash_table.h> 39 #include <adt/list.h> 40 #include <fibril_synch.h> 37 41 #include <ipc/common.h> 38 #include <abi/proc/task.h> 42 43 /** What type of retval from the task we have */ 44 typedef enum { 45 RVAL_UNSET, /**< unset */ 46 RVAL_SET, /**< retval set, e.g. by server */ 47 RVAL_SET_EXIT /**< retval set, wait for expected task exit */ 48 } retval_t; 49 50 /** Holds necessary information of each (registered) task. */ 51 typedef struct { 52 ht_link_t link; 53 54 task_id_t id; /**< Task id. */ 55 task_exit_t exit; /**< Task's uspace exit status. */ 56 bool failed; /**< Task failed (task can exit unexpectedly 57 even w/out failure). */ 58 retval_t retval_type; /**< Task returned a value. */ 59 int retval; /**< The return value. */ 60 61 link_t listeners; /**< Link to listeners list. */ 62 async_sess_t *sess; /**< Session for notifications to task. */ 63 } task_t; 64 65 extern hash_table_t task_hash_table; 66 extern fibril_rwlock_t task_hash_table_lock; 39 67 40 68 extern int task_init(void); 41 extern void process_pending_wait(void);42 69 43 extern void wait_for_task(task_id_t, int, ipc_callid_t, ipc_call_t *); 44 extern int task_set_retval(ipc_call_t *); 70 extern task_t *task_get_by_id(task_id_t); 45 71 46 72 extern int task_intro(ipc_call_t *, bool); 47 extern void task_terminated(task_id_t, exit_reason_t);48 extern void task_failed(task_id_t);49 73 50 74 #endif
Note:
See TracChangeset
for help on using the changeset viewer.