Rev 1104 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1104 | Rev 1658 | ||
---|---|---|---|
Line 42... | Line 42... | ||
42 | static void reader(void *arg); |
42 | static void reader(void *arg); |
43 | static void failed(void); |
43 | static void failed(void); |
44 | 44 | ||
45 | void reader(void *arg) |
45 | void reader(void *arg) |
46 | { |
46 | { |
- | 47 | thread_detach(THREAD); |
|
- | 48 | ||
47 | printf("cpu%d, tid %d: trying to lock rwlock for reading....\n", CPU->id, THREAD->tid); |
49 | printf("cpu%d, tid %d: trying to lock rwlock for reading....\n", CPU->id, THREAD->tid); |
48 | rwlock_read_lock(&rwlock); |
50 | rwlock_read_lock(&rwlock); |
49 | rwlock_read_unlock(&rwlock); |
51 | rwlock_read_unlock(&rwlock); |
50 | printf("cpu%d, tid %d: success\n", CPU->id, THREAD->tid); |
52 | printf("cpu%d, tid %d: success\n", CPU->id, THREAD->tid); |
51 | 53 |