Rev 111 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 111 | Rev 171 | ||
---|---|---|---|
Line 38... | Line 38... | ||
38 | #define WRITERS 50 |
38 | #define WRITERS 50 |
39 | 39 | ||
40 | static rwlock_t rwlock; |
40 | static rwlock_t rwlock; |
41 | 41 | ||
42 | static void reader(void *arg); |
42 | static void reader(void *arg); |
43 | static void failed(void *arg); |
43 | static void failed(void); |
44 | 44 | ||
45 | void reader(void *arg) |
45 | void reader(void *arg) |
46 | { |
46 | { |
47 | printf("cpu%d, tid %d: trying to lock rwlock for reading....\n", CPU->id, THREAD->tid); |
47 | printf("cpu%d, tid %d: trying to lock rwlock for reading....\n", CPU->id, THREAD->tid); |
48 | rwlock_read_lock(&rwlock); |
48 | rwlock_read_lock(&rwlock); |