summaryrefslogtreecommitdiff
path: root/ptw32_MCS_lock.c
diff options
context:
space:
mode:
authorrpj <rpj>2011-03-06 15:01:05 +0000
committerrpj <rpj>2011-03-06 15:01:05 +0000
commita39dab139b7c301ffd5a5592c292123c54e686cd (patch)
tree73aeb7a868f7c075de9ec43344d17d21f99763f9 /ptw32_MCS_lock.c
parent1183e5acfa10c7bda1dc39034d6e2fa6dec6016f (diff)
More 64 bit cast fixups
Diffstat (limited to 'ptw32_MCS_lock.c')
-rw-r--r--ptw32_MCS_lock.c20
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;