diff options
Diffstat (limited to 'ptw32_MCS_lock.c')
-rw-r--r-- | ptw32_MCS_lock.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/ptw32_MCS_lock.c b/ptw32_MCS_lock.c index bb942ba..ff74efa 100644 --- a/ptw32_MCS_lock.c +++ b/ptw32_MCS_lock.c @@ -148,7 +148,10 @@ ptw32_mcs_flag_wait (LONG * flag) * Algorithms for Scalable Synchronization on Shared-Memory Multiprocessors. * ACM Transactions on Computer Systems, 9(1):21-65, Feb. 1991. */ -INLINE void +#ifdef PTW32_BUILD_INLINED +INLINE +#endif /* PTW32_BUILD_INLINED */ +void ptw32_mcs_lock_acquire (ptw32_mcs_lock_t * lock, ptw32_mcs_local_node_t * node) { ptw32_mcs_local_node_t *pred; @@ -179,7 +182,10 @@ ptw32_mcs_lock_acquire (ptw32_mcs_lock_t * lock, ptw32_mcs_local_node_t * node) * Algorithms for Scalable Synchronization on Shared-Memory Multiprocessors. * ACM Transactions on Computer Systems, 9(1):21-65, Feb. 1991. */ -INLINE void +#ifdef PTW32_BUILD_INLINED +INLINE +#endif /* PTW32_BUILD_INLINED */ +void ptw32_mcs_lock_release (ptw32_mcs_local_node_t * node) { ptw32_mcs_lock_t *lock = node->lock; @@ -212,7 +218,10 @@ ptw32_mcs_lock_release (ptw32_mcs_local_node_t * node) /* * ptw32_mcs_lock_try_acquire */ -INLINE int +#ifdef PTW32_BUILD_INLINED +INLINE +#endif /* PTW32_BUILD_INLINED */ +int ptw32_mcs_lock_try_acquire (ptw32_mcs_lock_t * lock, ptw32_mcs_local_node_t * node) { node->lock = lock; @@ -238,7 +247,10 @@ ptw32_mcs_lock_try_acquire (ptw32_mcs_lock_t * lock, ptw32_mcs_local_node_t * no * * Should only be called by the thread that has the lock. */ -INLINE void +#ifdef PTW32_BUILD_INLINED +INLINE +#endif /* PTW32_BUILD_INLINED */ +void ptw32_mcs_node_transfer (ptw32_mcs_local_node_t * new_node, ptw32_mcs_local_node_t * old_node) { new_node->lock = old_node->lock; |