- Timestamp:
- 2005-12-15T10:27:59Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7dd2561
- Parents:
- 3fc03fd
- Location:
- test
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
test/synch/rwlock4/test.c
r3fc03fd rdc747e3 40 40 #include <synch/rwlock.h> 41 41 #include <synch/synch.h> 42 #include <synch/spinlock.h> 42 43 43 44 #define READERS 50 … … 46 47 static rwlock_t rwlock; 47 48 48 static spinlock_t lock;49 SPINLOCK_INITIALIZE(lock); 49 50 50 51 static waitq_t can_start; -
test/synch/semaphore2/test.c
r3fc03fd rdc747e3 38 38 #include <synch/semaphore.h> 39 39 #include <synch/synch.h> 40 #include <synch/spinlock.h> 40 41 41 42 static semaphore_t sem; 42 43 43 static spinlock_t lock;44 SPINLOCK_INITIALIZE(lock); 44 45 45 46 static waitq_t can_start; -
test/thread/thread1/test.c
r3fc03fd rdc747e3 38 38 #include <arch.h> 39 39 40 41 42 40 #define THREADS 5 43 44 41 45 42 static void thread(void *data) … … 52 49 } 53 50 54 55 56 51 void test(void) 57 52 { … … 59 54 int i; 60 55 61 62 63 for (i=0; i<THREADS; i++) 64 { 56 for (i=0; i<THREADS; i++) { 65 57 if (!(t = thread_create(thread, NULL, TASK, 0))) 66 58 panic("could not create thread\n"); … … 68 60 } 69 61 printf("ok\n"); 70 71 62 }
Note:
See TracChangeset
for help on using the changeset viewer.