Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4451 → Rev 4452

/trunk/kernel/generic/include/ipc/event_types.h
42,6 → 42,11
EVENT_END
} event_type_t;
 
typedef enum wait_type {
TASK_CREATE = 0,
TASK_DESTROY
} wait_type_t;
 
#endif
 
/** @}
/trunk/kernel/generic/src/proc/task.c
198,7 → 198,14
avltree_insert(&tasks_tree, &ta->tasks_tree_node);
spinlock_unlock(&tasks_lock);
interrupts_restore(ipl);
 
/*
* Notify about task creation.
*/
if (event_is_subscribed(EVENT_WAIT))
event_notify_3(EVENT_WAIT, TASK_CREATE, LOWER32(ta->taskid),
UPPER32(ta->taskid));
return ta;
}
 
235,7 → 242,8
* Notify about task destruction.
*/
if (event_is_subscribed(EVENT_WAIT))
event_notify_2(EVENT_WAIT, LOWER32(t->taskid), UPPER32(t->taskid));
event_notify_3(EVENT_WAIT, TASK_DESTROY, LOWER32(t->taskid),
UPPER32(t->taskid));
free(t);
TASK = NULL;