diff --git a/src/servers/app/proto7/DisplayDriver.cpp b/src/servers/app/proto7/DisplayDriver.cpp index baf464b42e..43ad97cc23 100644 --- a/src/servers/app/proto7/DisplayDriver.cpp +++ b/src/servers/app/proto7/DisplayDriver.cpp @@ -103,9 +103,12 @@ BPoint DisplayDriver::GetHotSpot(void) // Private Methods //--------------------------------------------------------- -void DisplayDriver::Lock(void) +bool DisplayDriver::Lock(bigtime_t timeout) // defaults to B_INIFINITE_TIMEOUT { - acquire_sem(lock_sem); +// acquire_sem(lock_sem); + if(acquire_sem_etc(lock_sem,1,B_RELATIVE_TIMEOUT,timeout)!=B_NO_ERROR) + return false; + return true; } void DisplayDriver::Unlock(void) diff --git a/src/servers/app/proto7/DisplayDriver.h b/src/servers/app/proto7/DisplayDriver.h index fd3bb254ed..0088c4b7b2 100644 --- a/src/servers/app/proto7/DisplayDriver.h +++ b/src/servers/app/proto7/DisplayDriver.h @@ -110,7 +110,7 @@ public: BPoint GetHotSpot(void); protected: - void Lock(void); + bool Lock(bigtime_t timeout=B_INFINITE_TIMEOUT); void Unlock(void); void SetDepthInternal(uint8 d); void SetHeightInternal(uint16 h);