Subversion Repositories HelenOS

Rev

Rev 4448 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4448 Rev 4452
Line 196... Line 196...
196
    avltree_node_initialize(&ta->tasks_tree_node);
196
    avltree_node_initialize(&ta->tasks_tree_node);
197
    ta->tasks_tree_node.key = ta->taskid;
197
    ta->tasks_tree_node.key = ta->taskid;
198
    avltree_insert(&tasks_tree, &ta->tasks_tree_node);
198
    avltree_insert(&tasks_tree, &ta->tasks_tree_node);
199
    spinlock_unlock(&tasks_lock);
199
    spinlock_unlock(&tasks_lock);
200
    interrupts_restore(ipl);
200
    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
   
202
    return ta;
209
    return ta;
203
}
210
}
204
 
211
 
205
/** Destroy task.
212
/** Destroy task.
206
 *
213
 *
Line 233... Line 240...
233
   
240
   
234
    /*
241
    /*
235
     * Notify about task destruction.
242
     * Notify about task destruction.
236
     */
243
     */
237
    if (event_is_subscribed(EVENT_WAIT))
244
    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));
239
   
247
   
240
    free(t);
248
    free(t);
241
    TASK = NULL;
249
    TASK = NULL;
242
}
250
}
243
 
251