Subversion Repositories HelenOS-historic

Rev

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

Rev 772 Rev 1062
Line 106... Line 106...
106
 
106
 
107
void * thr_data[THREADS][THR_MEM_COUNT];
107
void * thr_data[THREADS][THR_MEM_COUNT];
108
slab_cache_t *thr_cache;
108
slab_cache_t *thr_cache;
109
semaphore_t thr_sem;
109
semaphore_t thr_sem;
110
 
110
 
111
static void thread(void *data)
111
static void slabtest(void *data)
112
{
112
{
113
    int offs = (int)(__native) data;
113
    int offs = (int)(__native) data;
114
    int i,j;
114
    int i,j;
115
 
115
 
116
    printf("Starting thread #%d...\n",THREAD->tid);
116
    printf("Starting thread #%d...\n",THREAD->tid);
Line 136... Line 136...
136
    thr_cache = slab_cache_create("thread_cache", THR_MEM_SIZE, 0,
136
    thr_cache = slab_cache_create("thread_cache", THR_MEM_SIZE, 0,
137
                      NULL, NULL,
137
                      NULL, NULL,
138
                      SLAB_CACHE_NOMAGAZINE);
138
                      SLAB_CACHE_NOMAGAZINE);
139
    semaphore_initialize(&thr_sem,0);
139
    semaphore_initialize(&thr_sem,0);
140
    for (i=0; i<THREADS; i++) {  
140
    for (i=0; i<THREADS; i++) {  
141
        if (!(t = thread_create(thread, (void *)(__native)i, TASK, 0)))
141
        if (!(t = thread_create(slabtest, (void *)(__native)i, TASK, 0, "slabtest")))
142
            panic("could not create thread\n");
142
            panic("could not create thread\n");
143
        thread_ready(t);
143
        thread_ready(t);
144
    }
144
    }
145
 
145
 
146
    for (i=0; i<THREADS; i++)
146
    for (i=0; i<THREADS; i++)