Temporarily disable context / task switching.

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Temporarily disable context / task switching.

跳至解决方案
829 次查看
brad_ci
Contributor II

I have a section of code (a few lines) which much not be interrupted (updating the hardware watchdog) by context/task switching. How can I tell MQX to temporarily disable task switching? I couldn't find anything in the documention, but I was sure I've seen it before...

 

Thanks,

 

Brad

0 项奖励
1 解答
502 次查看
brad_ci
Contributor II

to answer my own question:

 

_task_stop_preemption();

 

and 


_task_start_preemption();

在原帖中查看解决方案

0 项奖励
2 回复数
503 次查看
brad_ci
Contributor II

to answer my own question:

 

_task_stop_preemption();

 

and 


_task_start_preemption();

0 项奖励
502 次查看
MarkP_
Contributor V

Should the interrupts also be disabled?

I have used:

_int_disable();
_int_enable();

 

~Mark

0 项奖励