xref: /haiku/src/tests/kits/app/bhandler/LockLooperTestCommon.cpp (revision 76a5f3484abd9a293483b45f40455c0b58e6f3f0)
1 //------------------------------------------------------------------------------
2 //	LockLooperTestCommon.cpp
3 //
4 //------------------------------------------------------------------------------
5 
6 // Standard Includes -----------------------------------------------------------
7 
8 // System Includes -------------------------------------------------------------
9 #include <Looper.h>
10 
11 // Project Includes ------------------------------------------------------------
12 
13 // Local Includes --------------------------------------------------------------
14 #include "LockLooperTestCommon.h"
15 
16 // Local Defines ---------------------------------------------------------------
17 
18 // Globals ---------------------------------------------------------------------
19 
20 //------------------------------------------------------------------------------
LockLooperThreadFunc(void * data)21 int32 LockLooperThreadFunc(void* data)
22 {
23 	TLockLooperInfo* info = (TLockLooperInfo*)data;
24 
25 	// Forces the test to encounter a pre-locked looper
26 	info->LockLooper();
27 
28 	// Let the test proceed (finding the locked looper)
29 	info->UnlockTest();
30 
31 	// Wait until the thread is dead
32 	info->LockThread();
33 
34 	return 0;
35 }
36 //------------------------------------------------------------------------------
37 
38 /*
39  * $Log $
40  *
41  * $Id  $
42  *
43  */
44 
45 
46