Changeset 1fb4a49 in mainline
- Timestamp:
- 2019-08-07T05:34:50Z (6 years ago)
- Children:
- 5cd2290
- Parents:
- 3ea98e8
- git-author:
- Michal Koutný <xm.koutny+hos@…> (2015-10-18 10:51:05)
- git-committer:
- Matthieu Riolo <matthieu.riolo@…> (2019-08-07 05:34:50)
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
abi/include/abi/proc/task.h
r3ea98e8 r1fb4a49 40 40 typedef uint64_t task_id_t; 41 41 42 typedef enum { 43 /** Task terminated synchronously on its own request. */ 44 EXIT_REASON_SELF, 45 /** Task was killed by kill request (own or outer). */ 46 EXIT_REASON_KILLED 47 } exit_reason_t; 48 42 49 #endif 43 50 -
kernel/generic/include/proc/task.h
r3ea98e8 r1fb4a49 97 97 cap_info_t *cap_info; 98 98 99 /** Exit reason. */ 100 exit_reason_t exit_reason; 101 99 102 /* IPC stuff */ 100 103 -
kernel/generic/src/proc/task.c
r3ea98e8 r1fb4a49 83 83 84 84 /* Forward declarations. */ 85 static void task_kill_internal(task_t * );85 static void task_kill_internal(task_t *, exit_reason_t); 86 86 static errno_t tsk_constructor(void *, unsigned int); 87 87 static size_t tsk_destructor(void *); … … 527 527 } 528 528 529 static void task_kill_internal(task_t *task )529 static void task_kill_internal(task_t *task, exit_reason_t exit_reason) 530 530 { 531 531 irq_spinlock_lock(&task->lock, false); 532 532 irq_spinlock_lock(&threads_lock, false); 533 534 task->exit_reason = exit_reason; 533 535 534 536 /* … … 578 580 } 579 581 580 task_kill_internal(task );582 task_kill_internal(task, EXIT_REASON_KILLED); 581 583 irq_spinlock_unlock(&tasks_lock, true); 582 584 … … 611 613 612 614 irq_spinlock_lock(&tasks_lock, true); 613 task_kill_internal(TASK );615 task_kill_internal(TASK, EXIT_REASON_SELF); 614 616 irq_spinlock_unlock(&tasks_lock, true); 615 617 -
kernel/generic/src/proc/thread.c
r3ea98e8 r1fb4a49 527 527 * after any IPC cleanup operations. Ignore any errors. 528 528 */ 529 (void)event_notify_2(EVENT_EXIT, false, 530 LOWER32(TASK->taskid), UPPER32(TASK->taskid)); 529 (void)event_notify_3(EVENT_EXIT, false, 530 LOWER32(TASK->taskid), UPPER32(TASK->taskid), 531 TASK->exit_reason); 531 532 } 532 533 }
Note:
See TracChangeset
for help on using the changeset viewer.