We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
who unlock the mutex f1() or f2() ? function f1() should unlock the mutex, is this right ?
#include <rtl.h>
OS_MUT mutex;
void f1 (void) { os_mut_wait (mutex, 0xffff); f2 (); .. /* Critical region 1 */ .. os_mut_release (mutex); }
void f2 (void) { os_mut_wait (mutex1, 0xffff); .. /* Critical region 2 */ .. os_mut_release (mutex1); }
__task void task1 (void) { os_mut_init (mutex); f1 (); .. }
thanks, willi
yes.
however you could have read the answer in www.keil.com/.../rlarm_os_mut_release.htm