Changeset dff0a94 in mainline
- Timestamp:
- 2006-12-11T19:41:04Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 00bb6965
- Parents:
- e54fb21
- Location:
- kernel/test/synch
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/test/synch/rwlock4.c
re54fb21 rdff0a94 47 47 static rwlock_t rwlock; 48 48 49 static SPINLOCK_INITIALIZE(lock);49 SPINLOCK_INITIALIZE(rw_lock); 50 50 51 51 static waitq_t can_start; … … 63 63 uint32_t rc; 64 64 65 spinlock_lock(& lock);65 spinlock_lock(&rw_lock); 66 66 rc = seed % max; 67 67 seed = (((seed<<2) ^ (seed>>2)) * 487) + rc; 68 spinlock_unlock(& lock);68 spinlock_unlock(&rw_lock); 69 69 return rc; 70 70 } -
kernel/test/synch/semaphore2.c
re54fb21 rdff0a94 42 42 static semaphore_t sem; 43 43 44 static SPINLOCK_INITIALIZE(lock);44 SPINLOCK_INITIALIZE(sem_lock); 45 45 46 46 static waitq_t can_start; … … 57 57 uint32_t rc; 58 58 59 spinlock_lock(& lock);59 spinlock_lock(&sem_lock); 60 60 rc = seed % max; 61 61 seed = (((seed<<2) ^ (seed>>2)) * 487) + rc; 62 spinlock_unlock(& lock);62 spinlock_unlock(&sem_lock); 63 63 return rc; 64 64 }
Note:
See TracChangeset
for help on using the changeset viewer.