Changeset 3529f148 in mainline for uspace/srv
- Timestamp:
- 2020-03-06T19:14:20Z (6 years ago)
- Children:
- 13b4504
- Parents:
- 06599a1
- git-author:
- Matthieu Riolo <matthieu.riolo@…> (2020-02-29 11:22:13)
- git-committer:
- Matthieu Riolo <matthieu.riolo@…> (2020-03-06 19:14:20)
- Location:
- uspace/srv
- Files:
-
- 6 edited
-
sysman/connection_ctl.c (modified) (2 diffs)
-
sysman/sm_task.c (modified) (2 diffs)
-
sysman/units/unit_mnt.c (modified) (2 diffs)
-
taskman/event.c (modified) (7 diffs)
-
taskman/event.h (modified) (1 diff)
-
taskman/main.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/sysman/connection_ctl.c
r06599a1 r3529f148 104 104 } 105 105 106 i nt flags = ipc_get_arg1(icall);106 ipc_start_flag_t flags = ipc_get_arg1(icall); 107 107 sysman_log(LVL_DEBUG2, "%s(%s, %x)", __func__, unit_name, flags); 108 108 … … 144 144 145 145 unit_handle_t handle = ipc_get_arg1(icall); 146 sysarg_t flags = ipc_get_arg2(icall);147 sysman_log(LVL_DEBUG2, "%s(%p, % " SCNuPTR ", %i)", __func__, icall->cap_handle, flags, state);146 ipc_start_flag_t flags = ipc_get_arg2(icall); 147 sysman_log(LVL_DEBUG2, "%s(%p, %u, %i)", __func__, icall->cap_handle, flags, state); 148 148 149 149 unit_t *unit = repo_find_unit_by_handle(handle); -
uspace/srv/sysman/sm_task.c
r06599a1 r3529f148 41 41 struct sm_task_event { 42 42 task_id_t task_id; 43 int flags;43 task_wait_flag_t flags; 44 44 task_exit_t texit; 45 45 int retval; … … 51 51 * @note This function runs in separate fibril (not same as event loop). 52 52 */ 53 static void sm_task_event_handler(task_id_t tid, int flags, task_exit_t texit,53 static void sm_task_event_handler(task_id_t tid, task_wait_flag_t flags, task_exit_t texit, 54 54 int retval) 55 55 { -
uspace/srv/sysman/units/unit_mnt.c
r06599a1 r3529f148 54 54 char *device; 55 55 char *options; 56 unsigned int flags;56 ipc_start_flag_t flags; 57 57 unsigned int instance; 58 58 … … 208 208 */ 209 209 210 mnt_data.flags |= u_mnt->blocking ? IPC_FLAG_BLOCKING: 0;211 mnt_data.flags |= u_mnt->autostart ? IPC_AUTOSTART: 0;210 mnt_data.flags |= u_mnt->blocking ? true : 0; 211 mnt_data.flags |= u_mnt->autostart ? true : 0; 212 212 mnt_data.unit = unit; 213 213 -
uspace/srv/taskman/event.c
r06599a1 r3529f148 50 50 task_id_t waiter_id; /**< Task ID who waits. */ 51 51 ipc_call_t *icall; /**< Call ID waiting for the event. */ 52 int flags;/**< Wait flags. */52 task_wait_flag_t flags; /**< Wait flags. */ 53 53 } pending_wait_t; 54 54 … … 67 67 } 68 68 69 static int event_flags(task_t *task)70 { 71 int flags = 0;69 static task_wait_flag_t event_flags(task_t *task) 70 { 71 task_wait_flag_t flags = TASK_WAIT_NONE; 72 72 if (task->retval_type == RVAL_SET) { 73 73 flags |= TASK_WAIT_RETVAL; … … 88 88 static void event_notify(task_t *sender, async_sess_t *sess) 89 89 { 90 int flags = event_flags(sender);91 if (flags == 0) {90 task_wait_flag_t flags = event_flags(sender); 91 if (flags == TASK_WAIT_NONE) { 92 92 return; 93 93 } … … 114 114 static void event_notify_all(task_t *sender) 115 115 { 116 int flags = event_flags(sender);117 if (flags == 0) {116 task_wait_flag_t flags = event_flags(sender); 117 if (flags == TASK_WAIT_NONE) { 118 118 return; 119 119 } … … 140 140 continue; // TODO really when does this happen? 141 141 } 142 int notify_flags = event_flags(t);142 task_wait_flag_t notify_flags = event_flags(t); 143 143 144 144 /* … … 146 146 * thus it can be never present in rest flags. 147 147 */ 148 int rest = (~notify_flags & pr->flags) & ~TASK_WAIT_RETVAL;148 task_wait_flag_t rest = (~notify_flags & pr->flags) & ~TASK_WAIT_RETVAL; 149 149 rest &= ~TASK_WAIT_BOTH; 150 intmatch = notify_flags & pr->flags;150 bool match = notify_flags & pr->flags; 151 151 // TODO why do I even accept such calls? 152 152 bool answer = !(pr->icall->flags & IPC_CALL_NOTIF); … … 233 233 } 234 234 235 void wait_for_task(task_id_t id, int flags, ipc_call_t *icall,235 void wait_for_task(task_id_t id, task_wait_flag_t flags, ipc_call_t *icall, 236 236 task_id_t waiter_id) 237 237 { -
uspace/srv/taskman/event.h
r06599a1 r3529f148 44 44 ipc_call_t *); 45 45 extern void dump_events(task_id_t, ipc_call_t *); 46 extern void wait_for_task(task_id_t, int, ipc_call_t *, task_id_t);46 extern void wait_for_task(task_id_t, task_wait_flag_t, ipc_call_t *, task_id_t); 47 47 extern errno_t task_set_retval(task_id_t, int, bool); 48 48 -
uspace/srv/taskman/main.c
r06599a1 r3529f148 97 97 98 98 /* After forward we can dispose all session-related resources */ 99 async_hangup(sess_ref->sess);99 //async_hangup(sess_ref->sess); 100 100 free(sess_ref); 101 101
Note:
See TracChangeset
for help on using the changeset viewer.
