/kernel/trunk/test/synch/rwlock4/test.c |
---|
39,7 → 39,6 |
#include <synch/waitq.h> |
#include <synch/rwlock.h> |
#include <synch/synch.h> |
#include <synch/spinlock.h> |
#define READERS 50 |
#define WRITERS 50 |
46,7 → 45,7 |
static rwlock_t rwlock; |
SPINLOCK_INITIALIZE(lock); |
static spinlock_t lock; |
static waitq_t can_start; |
/kernel/trunk/test/synch/semaphore2/test.c |
---|
37,11 → 37,10 |
#include <synch/waitq.h> |
#include <synch/semaphore.h> |
#include <synch/synch.h> |
#include <synch/spinlock.h> |
static semaphore_t sem; |
SPINLOCK_INITIALIZE(lock); |
static spinlock_t lock; |
static waitq_t can_start; |
/kernel/trunk/test/thread/thread1/test.c |
---|
37,8 → 37,11 |
#include <arch.h> |
#define THREADS 5 |
static void thread(void *data) |
{ |
while(1) |
48,15 → 51,21 |
} |
} |
void test(void) |
{ |
thread_t *t; |
int i; |
for (i=0; i<THREADS; i++) { |
for (i=0; i<THREADS; i++) |
{ |
if (!(t = thread_create(thread, NULL, TASK, 0))) |
panic("could not create thread\n"); |
thread_ready(t); |
} |
printf("ok\n"); |
} |