Subversion Repositories HelenOS-historic

Rev

Rev 552 | Rev 624 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 552 Rev 623
Line 34... Line 34...
34
#include <synch/spinlock.h>
34
#include <synch/spinlock.h>
35
#include <arch.h>
35
#include <arch.h>
36
#include <panic.h>
36
#include <panic.h>
37
#include <list.h>
37
#include <list.h>
38
 
38
 
39
spinlock_t tasks_lock;
39
SPINLOCK_INITIALIZE(tasks_lock);
40
link_t tasks_head;
40
link_t tasks_head;
41
 
41
 
42
 
42
 
43
/** Initialize tasks
43
/** Initialize tasks
44
 *
44
 *
Line 46... Line 46...
46
 *
46
 *
47
 */
47
 */
48
void task_init(void)
48
void task_init(void)
49
{
49
{
50
    TASK = NULL;
50
    TASK = NULL;
51
    spinlock_initialize(&tasks_lock, "tasks_lock");
-
 
52
    list_initialize(&tasks_head);
51
    list_initialize(&tasks_head);
53
}
52
}
54
 
53
 
55
 
54
 
56
/** Create new task
55
/** Create new task