Changeset 178 for soft/giet_vm/libs/libsrl/srl_lock.h
- Timestamp:
- Jul 22, 2012, 12:06:11 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/libs/libsrl/srl_lock.h
r160 r178 21 21 */ 22 22 23 #include "srl_public_types.h" 24 #include "stdio.h" 23 #include "spin_lock.h" 25 24 26 typedef struct { 27 unsigned int lock; 28 }srl_lock_t; 29 30 #define SRL_LOCK_INITIALIZER { 0 } 25 typedef giet_lock_t* srl_lock_t; 31 26 32 27 /** … … 35 30 @param lock The lock object 36 31 */ 37 int srl_lock_lock( srl_lock_t lock);32 #define srl_lock_lock(lock) lock_acquire(lock); 38 33 39 34 /** 40 @this releases a l -ock.35 @this releases a lock. 41 36 42 37 @param lock The lock object 43 38 */ 44 void srl_lock_unlock( srl_lock_t lock);39 #define srl_lock_unlock( lock ) lock_release(lock); 45 40 46 41 /** … … 51 46 @return 0 if the lock was taken successfully 52 47 */ 53 int srl_lock_try_lock( srl_lock_tlock );48 #define srl_lock_try_lock( lock ) lock_try_acquire( lock ); 54 49 55 50 #endif
Note: See TracChangeset
for help on using the changeset viewer.