...
Files
os.h/os_core.c
Prototype
Code Block |
---|
void OSSchedUnlock (OS_ERR *p_err) |
Arguments
p_err
is a pointer to a variable that will contain an error code returned by this function.
...
Notes/Warnings
None
Example Usage
Code Block | ||
---|---|---|
| ||
void TaskX (void *p_arg)
{
OS_ERR err;
(void)&p_arg;
while (DEF_ON) {
:
OSSchedLock(&err); /* Prevent other tasks to run */
/* Check "err" */
:
: /* Code protected from context switch */
:
OSSchedUnlock(&err); /* Enable other tasks to run */
/* Check "err" */
:
:
}
} |