Changeset 8658f89 in mainline


Ignore:
Timestamp:
2009-06-03T05:40:56Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
831667a9
Parents:
8f4bc1f
Message:

send notification also during task creation
(the intention is to be able to pair task creation and destruction to avoid missed waits)

Location:
kernel/generic
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/ipc/event_types.h

    r8f4bc1f r8658f89  
    4343} event_type_t;
    4444
     45typedef enum wait_type {
     46        TASK_CREATE = 0,
     47        TASK_DESTROY
     48} wait_type_t;
     49
    4550#endif
    4651
  • kernel/generic/src/proc/task.c

    r8f4bc1f r8658f89  
    199199        spinlock_unlock(&tasks_lock);
    200200        interrupts_restore(ipl);
    201 
     201       
     202        /*
     203         * Notify about task creation.
     204         */
     205        if (event_is_subscribed(EVENT_WAIT))
     206                event_notify_3(EVENT_WAIT, TASK_CREATE, LOWER32(ta->taskid),
     207                    UPPER32(ta->taskid));
     208       
    202209        return ta;
    203210}
     
    236243         */
    237244        if (event_is_subscribed(EVENT_WAIT))
    238                 event_notify_2(EVENT_WAIT, LOWER32(t->taskid), UPPER32(t->taskid));
     245                event_notify_3(EVENT_WAIT, TASK_DESTROY, LOWER32(t->taskid),
     246                    UPPER32(t->taskid));
    239247       
    240248        free(t);
Note: See TracChangeset for help on using the changeset viewer.