X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=tbb%2Finclude%2Ftbb%2Fqueuing_rw_mutex.h;h=644bdfdab1531ba5c447def0740a5718d8e71a06;hb=4c96b4064a92f65beead3cb2453d727187bed40f;hp=3c76332e649a4f9cd02654a51e89185184e9cd7f;hpb=46ab0514ba58ee00183ff0584c7ea7c9e3d76494;p=casparcg diff --git a/tbb/include/tbb/queuing_rw_mutex.h b/tbb/include/tbb/queuing_rw_mutex.h index 3c76332e6..644bdfdab 100644 --- a/tbb/include/tbb/queuing_rw_mutex.h +++ b/tbb/include/tbb/queuing_rw_mutex.h @@ -78,11 +78,11 @@ public: class scoped_lock: internal::no_copy { //! Initialize fields void initialize() { - mutex = NULL; + my_mutex = NULL; #if TBB_USE_ASSERT - state = 0xFF; // Set to invalid state - internal::poison_pointer(next); - internal::poison_pointer(prev); + my_state = 0xFF; // Set to invalid state + internal::poison_pointer(my_next); + internal::poison_pointer(my_prev); #endif /* TBB_USE_ASSERT */ } public: @@ -98,7 +98,7 @@ public: //! Release lock (if lock is held). ~scoped_lock() { - if( mutex ) release(); + if( my_mutex ) release(); } //! Acquire lock on given mutex. @@ -119,22 +119,22 @@ public: private: //! The pointer to the current mutex to work - queuing_rw_mutex* mutex; + queuing_rw_mutex* my_mutex; //! The pointer to the previous and next competitors for a mutex - scoped_lock * prev, * next; + scoped_lock *__TBB_atomic my_prev, *__TBB_atomic my_next; typedef unsigned char state_t; //! State of the request: reader, writer, active reader, other service states - atomic state; + atomic my_state; //! The local spin-wait variable /** Corresponds to "spin" in the pseudocode but inverted for the sake of zero-initialization */ - unsigned char going; + unsigned char __TBB_atomic my_going; //! A tiny internal lock - unsigned char internal_lock; + unsigned char my_internal_lock; //! Acquire the internal lock void acquire_internal_lock();