Changeset 43114c5 in mainline for test/synch/rwlock3/test.c
- Timestamp:
- 2005-04-09T18:22:53Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8262010
- Parents:
- e6ba9a3f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/synch/rwlock3/test.c
re6ba9a3f r43114c5 45 45 void reader(void *arg) 46 46 { 47 printf("cpu%d, tid %d: trying to lock rwlock for reading....\n", the->cpu->id, the->thread->tid);47 printf("cpu%d, tid %d: trying to lock rwlock for reading....\n", CPU->id, THREAD->tid); 48 48 rwlock_read_lock(&rwlock); 49 49 rwlock_read_unlock(&rwlock); 50 printf("cpu%d, tid %d: success\n", the->cpu->id, the->thread->tid);50 printf("cpu%d, tid %d: success\n", CPU->id, THREAD->tid); 51 51 52 printf("cpu%d, tid %d: trying to lock rwlock for writing....\n", the->cpu->id, the->thread->tid);52 printf("cpu%d, tid %d: trying to lock rwlock for writing....\n", CPU->id, THREAD->tid); 53 53 54 54 rwlock_write_lock(&rwlock); 55 55 rwlock_write_unlock(&rwlock); 56 printf("cpu%d, tid %d: success\n", the->cpu->id, the->thread->tid);56 printf("cpu%d, tid %d: success\n", CPU->id, THREAD->tid); 57 57 58 58 printf("Test passed.\n"); … … 78 78 79 79 for (i=0; i<4; i++) { 80 thrd = thread_create(reader, NULL, the->task, 0);80 thrd = thread_create(reader, NULL, TASK, 0); 81 81 if (thrd) 82 82 thread_ready(thrd);
Note:
See TracChangeset
for help on using the changeset viewer.