Using LWP_Mutex functions January 13, 2009 12:21AM | Registered: 15 years ago Posts: 78 |
//global mutex_t lock; void InitFunction() { LWP_MutexInit(lock); } void Function_1() { LWP_MutexLock(lock); // Do stuff here LWP_MutexUnlock(lock); } void Function_2() { while (LWP_MutexLock(lock) != 0); // Do I need to wait for the lock like this? // Do stuff here LWP_MutexUnlock(lock); }Which is the correct method, Function_1 or Function_2?
Re: Using LWP_Mutex functions January 13, 2009 07:09AM | Registered: 15 years ago Posts: 265 |
Re: Using LWP_Mutex functions January 13, 2009 10:43AM | Registered: 15 years ago Posts: 22 |
Re: Using LWP_Mutex functions January 13, 2009 12:52PM | Registered: 15 years ago Posts: 78 |
Re: Using LWP_Mutex functions January 13, 2009 01:13PM | Registered: 15 years ago Posts: 22 |