Can I prevent a Linux user space pthread yielding in critical code?

前端 未结 3 1968
没有蜡笔的小新
没有蜡笔的小新 2020-12-18 07:34

I am working on an user space app for an embedded Linux project using the 2.6.24.3 kernel. My app passes data between two file nodes by creating 2 pthreads that each sleep

3条回答
  •  情话喂你
    2020-12-18 08:00

    I believe you are trying to outsmart the Linux scheduler here, for the wrong reasons.

    The correct solution is to use a mutex to prevent completion handlers from running in parallel. Let the scheduler do its job.

提交回复
热议问题