Changeset 201abde in mainline for kernel/test/synch
- Timestamp:
- 2007-04-07T20:06:52Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7e58979
- Parents:
- 6adbe3c2
- Location:
- kernel/test/synch
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/test/synch/rwlock3.c
r6adbe3c2 r201abde 46 46 47 47 if (!sh_quiet) 48 printf("cpu%d, tid % d: trying to lock rwlock for reading....\n", CPU->id, THREAD->tid);48 printf("cpu%d, tid %llu: trying to lock rwlock for reading....\n", CPU->id, THREAD->tid); 49 49 50 50 rwlock_read_lock(&rwlock); … … 52 52 53 53 if (!sh_quiet) { 54 printf("cpu%d, tid % d: success\n", CPU->id, THREAD->tid);55 printf("cpu%d, tid % d: trying to lock rwlock for writing....\n", CPU->id, THREAD->tid);54 printf("cpu%d, tid %llu: success\n", CPU->id, THREAD->tid); 55 printf("cpu%d, tid %llu: trying to lock rwlock for writing....\n", CPU->id, THREAD->tid); 56 56 } 57 57 … … 60 60 61 61 if (!sh_quiet) 62 printf("cpu%d, tid % d: success\n", CPU->id, THREAD->tid);62 printf("cpu%d, tid %llu: success\n", CPU->id, THREAD->tid); 63 63 64 64 atomic_dec(&thread_count); -
kernel/test/synch/rwlock4.c
r6adbe3c2 r201abde 75 75 76 76 if (!sh_quiet) 77 printf("cpu%d, tid % dw+ (%d)\n", CPU->id, THREAD->tid, to);77 printf("cpu%d, tid %llu w+ (%d)\n", CPU->id, THREAD->tid, to); 78 78 79 79 rc = rwlock_write_lock_timeout(&rwlock, to); 80 80 if (SYNCH_FAILED(rc)) { 81 81 if (!sh_quiet) 82 printf("cpu%d, tid % dw!\n", CPU->id, THREAD->tid);82 printf("cpu%d, tid %llu w!\n", CPU->id, THREAD->tid); 83 83 atomic_dec(&thread_count); 84 84 return; … … 86 86 87 87 if (!sh_quiet) 88 printf("cpu%d, tid % dw=\n", CPU->id, THREAD->tid);88 printf("cpu%d, tid %llu w=\n", CPU->id, THREAD->tid); 89 89 90 90 if (rwlock.readers_in) { … … 107 107 108 108 if (!sh_quiet) 109 printf("cpu%d, tid % dw-\n", CPU->id, THREAD->tid);109 printf("cpu%d, tid %llu w-\n", CPU->id, THREAD->tid); 110 110 atomic_dec(&thread_count); 111 111 } … … 120 120 121 121 if (!sh_quiet) 122 printf("cpu%d, tid % dr+ (%d)\n", CPU->id, THREAD->tid, to);122 printf("cpu%d, tid %llu r+ (%d)\n", CPU->id, THREAD->tid, to); 123 123 124 124 rc = rwlock_read_lock_timeout(&rwlock, to); 125 125 if (SYNCH_FAILED(rc)) { 126 126 if (!sh_quiet) 127 printf("cpu%d, tid % dr!\n", CPU->id, THREAD->tid);127 printf("cpu%d, tid %llu r!\n", CPU->id, THREAD->tid); 128 128 atomic_dec(&thread_count); 129 129 return; … … 131 131 132 132 if (!sh_quiet) 133 printf("cpu%d, tid % dr=\n", CPU->id, THREAD->tid);133 printf("cpu%d, tid %llu r=\n", CPU->id, THREAD->tid); 134 134 135 135 thread_usleep(30000); … … 137 137 138 138 if (!sh_quiet) 139 printf("cpu%d, tid % dr-\n", CPU->id, THREAD->tid);139 printf("cpu%d, tid %llu r-\n", CPU->id, THREAD->tid); 140 140 atomic_dec(&thread_count); 141 141 } -
kernel/test/synch/semaphore2.c
r6adbe3c2 r201abde 68 68 69 69 to = random(20000); 70 printf("cpu%d, tid % ddown+ (%d)\n", CPU->id, THREAD->tid, to);70 printf("cpu%d, tid %llu down+ (%d)\n", CPU->id, THREAD->tid, to); 71 71 rc = semaphore_down_timeout(&sem, to); 72 72 if (SYNCH_FAILED(rc)) { 73 printf("cpu%d, tid % ddown!\n", CPU->id, THREAD->tid);73 printf("cpu%d, tid %llu down!\n", CPU->id, THREAD->tid); 74 74 return; 75 75 } 76 76 77 printf("cpu%d, tid % ddown=\n", CPU->id, THREAD->tid);77 printf("cpu%d, tid %llu down=\n", CPU->id, THREAD->tid); 78 78 thread_usleep(random(30000)); 79 79 80 80 semaphore_up(&sem); 81 printf("cpu%d, tid % dup\n", CPU->id, THREAD->tid);81 printf("cpu%d, tid %llu up\n", CPU->id, THREAD->tid); 82 82 } 83 83
Note:
See TracChangeset
for help on using the changeset viewer.