Subversion Repositories HelenOS-historic

Rev

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

Rev 548 Rev 552
Line 94... Line 94...
94
 */
94
 */
95
void thread_init(void)
95
void thread_init(void)
96
{
96
{
97
    THREAD = NULL;
97
    THREAD = NULL;
98
    nrdy = 0;
98
    nrdy = 0;
99
    spinlock_initialize(&threads_lock);
99
    spinlock_initialize(&threads_lock, "threads_lock");
100
    list_initialize(&threads_head);
100
    list_initialize(&threads_head);
101
}
101
}
102
 
102
 
103
 
103
 
104
/** Make thread ready
104
/** Make thread ready
Line 171... Line 171...
171
 
171
 
172
    t = (thread_t *) malloc(sizeof(thread_t));
172
    t = (thread_t *) malloc(sizeof(thread_t));
173
    if (t) {
173
    if (t) {
174
        ipl_t ipl;
174
        ipl_t ipl;
175
   
175
   
176
        spinlock_initialize(&t->lock);
176
        spinlock_initialize(&t->lock, "thread_t_lock");
177
   
177
   
178
        frame_ks = frame_alloc(FRAME_KA, ONE_FRAME);
178
        frame_ks = frame_alloc(FRAME_KA, ONE_FRAME);
179
        if (THREAD_USER_STACK & flags) {
179
        if (THREAD_USER_STACK & flags) {
180
            frame_us = frame_alloc(FRAME_KA, ONE_FRAME);
180
            frame_us = frame_alloc(FRAME_KA, ONE_FRAME);
181
        }
181
        }