Hello:
I am trying to port existing code that have macro called "ENTER_CRITICAL_SECTION()" and "EXIT_CRITICAL_SECTION()". I look into the MQX document that doesn't have critical section API.
Does anyone know how to create a MQX called that service "ENTER_CRITICAL_SECTION()" and "EXIT_CRITICAL_SECTION()"?
Thank You
Mike
已解决! 转到解答。
In MQX3.8:
For short code block protection:
_int_disable()
_int_enable()
For other protection lightweigth semaphore:
_lwsem_create()
_lwsem_wait()
_lwsem_post()
Disabling task context switch but allows interrupts to run
_task_stop_preemption()
_task_start_preemption()
~Mark
In MQX3.8:
For short code block protection:
_int_disable()
_int_enable()
For other protection lightweigth semaphore:
_lwsem_create()
_lwsem_wait()
_lwsem_post()
Disabling task context switch but allows interrupts to run
_task_stop_preemption()
_task_start_preemption()
~Mark