diff options
author | Paradox <none@none> | 2009-02-17 20:10:49 -0600 |
---|---|---|
committer | Paradox <none@none> | 2009-02-17 20:10:49 -0600 |
commit | 3931b802f1b8b890a615e5b2a4c0ed70407468d7 (patch) | |
tree | b1386a80454be7ba341d4fcd4f87c133d9af95a7 /dep/src/zthread/PriorityInheritanceMutex.cxx | |
parent | 14234c86fa4f1b31436a0289cdac5f92ab430804 (diff) |
Yet more tabs to spaces
--HG--
branch : trunk
Diffstat (limited to 'dep/src/zthread/PriorityInheritanceMutex.cxx')
-rw-r--r-- | dep/src/zthread/PriorityInheritanceMutex.cxx | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/dep/src/zthread/PriorityInheritanceMutex.cxx b/dep/src/zthread/PriorityInheritanceMutex.cxx index 108e4a74370..6735d15d422 100644 --- a/dep/src/zthread/PriorityInheritanceMutex.cxx +++ b/dep/src/zthread/PriorityInheritanceMutex.cxx @@ -28,28 +28,28 @@ namespace ZThread { class InheritPriorityBehavior : public NullBehavior { - + ThreadImpl* owner; Priority p; protected: - // Temporarily raise the effective priority of the owner - inline void waiterArrived(ThreadImpl* impl) { - + // Temporarily raise the effective priority of the owner + inline void waiterArrived(ThreadImpl* impl) { + Priority q = impl->getPriority(); if((int)q > (int)p) { ThreadOps::setPriority(impl, p); p = q; - + } } // Note the owners priority - inline void ownerAcquired(ThreadImpl* impl) { + inline void ownerAcquired(ThreadImpl* impl) { p = impl->getPriority(); owner = impl; @@ -57,7 +57,7 @@ namespace ZThread { } // Restore its original priority - inline void ownerReleased(ThreadImpl* impl) { + inline void ownerReleased(ThreadImpl* impl) { if(p > owner->getPriority()) ThreadOps::setPriority(impl, impl->getPriority()); @@ -66,18 +66,18 @@ namespace ZThread { }; - class PriorityInheritanceMutexImpl : + class PriorityInheritanceMutexImpl : public MutexImpl<priority_list, InheritPriorityBehavior> { }; PriorityInheritanceMutex::PriorityInheritanceMutex() { - + _impl = new PriorityInheritanceMutexImpl(); - + } PriorityInheritanceMutex::~PriorityInheritanceMutex() { - if(_impl != 0) + if(_impl != 0) delete _impl; } @@ -85,7 +85,7 @@ namespace ZThread { // P void PriorityInheritanceMutex::acquire() { - _impl->acquire(); + _impl->acquire(); } @@ -93,14 +93,14 @@ namespace ZThread { // P bool PriorityInheritanceMutex::tryAcquire(unsigned long ms) { - return _impl->tryAcquire(ms); + return _impl->tryAcquire(ms); } // V void PriorityInheritanceMutex::release() { - _impl->release(); + _impl->release(); } |