Subversion Repositories HelenOS-historic

Rev

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

Rev 955 Rev 965
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 <adt/list.h>
37
#include <adt/list.h>
38
#include <ipc/ipc.h>
38
#include <ipc/ipc.h>
-
 
39
#include <ipc/ns.h>
39
#include <memstr.h>
40
#include <memstr.h>
40
 
41
 
41
SPINLOCK_INITIALIZE(tasks_lock);
42
SPINLOCK_INITIALIZE(tasks_lock);
42
LIST_INITIALIZE(tasks_head);
43
LIST_INITIALIZE(tasks_head);
43
 
44
 
Line 73... Line 74...
73
    list_initialize(&ta->tasks_link);
74
    list_initialize(&ta->tasks_link);
74
    ta->as = as;
75
    ta->as = as;
75
 
76
 
76
    ipc_answerbox_init(&ta->answerbox);
77
    ipc_answerbox_init(&ta->answerbox);
77
    memsetb((__address)&ta->phones, sizeof(ta->phones[0])*IPC_MAX_PHONES, 0);
78
    memsetb((__address)&ta->phones, sizeof(ta->phones[0])*IPC_MAX_PHONES, 0);
78
    if (ipc_central_box)
79
    if (ipc_phone_0)
79
        ipc_phone_init(&ta->phones[0], ipc_central_box);
80
        ipc_phone_init(&ta->phones[0], ipc_phone_0);
80
   
81
   
81
    ipl = interrupts_disable();
82
    ipl = interrupts_disable();
82
    spinlock_lock(&tasks_lock);
83
    spinlock_lock(&tasks_lock);
83
    list_append(&ta->tasks_link, &tasks_head);
84
    list_append(&ta->tasks_link, &tasks_head);
84
    spinlock_unlock(&tasks_lock);
85
    spinlock_unlock(&tasks_lock);