Temporarily disable context / task switching.

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Temporarily disable context / task switching.

ソリューションへジャンプ
996件の閲覧回数
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 解決策
669件の閲覧回数
brad_ci
Contributor II

to answer my own question:

 

_task_stop_preemption();

 

and 


_task_start_preemption();

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
670件の閲覧回数
brad_ci
Contributor II

to answer my own question:

 

_task_stop_preemption();

 

and 


_task_start_preemption();

0 件の賞賛
返信
669件の閲覧回数
MarkP_
Contributor V

Should the interrupts also be disabled?

I have used:

_int_disable();
_int_enable();

 

~Mark

0 件の賞賛
返信