MQX: Is printf safe to be used from multiple tasks ?

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

MQX: Is printf safe to be used from multiple tasks ?

ソリューションへジャンプ
762件の閲覧回数
robroz
Contributor III

Hi,

I guess it isn't - prints can get overlayed with printfs from other tasks, but would still like to confirm if I'm right or wrong..

Thanks,

Bulek

タグ(3)
0 件の賞賛
返信
1 解決策
466件の閲覧回数
JerryFan
NXP Employee
NXP Employee

The printf is not muti-task safe. Please see the code of _io_printf, please notice that no any sync method(sem, event, etc) used within it.  The call stack was listed to easy the code reading.

_io_printf -> _io_doprintf->_io_serila_poller_write.

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
467件の閲覧回数
JerryFan
NXP Employee
NXP Employee

The printf is not muti-task safe. Please see the code of _io_printf, please notice that no any sync method(sem, event, etc) used within it.  The call stack was listed to easy the code reading.

_io_printf -> _io_doprintf->_io_serila_poller_write.

0 件の賞賛
返信