Thread 中讨论的其他器件:BLE-STACK
你(们)好
我已经在 pthread 中设置了多个线程,有人能告诉我如何暂停和重新启动线程,因为我不需要某些线程一直运行。
此致
David
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
尊敬的 David:
您可以在以下位置找到 FreeRTOS 的文档: https://www.freertos.org/API/FreeRTOS_POSIX_pthread.html
他们还有一个论坛、您可以尝试在那里提问。
谢谢、
玛丽·H
尊敬的 David:
我认为使用 pthread (POSIX)没有任何方法可以实现这一点。 可以从线程内部使用 sleep()命令,但它听起来像是要从不同的线程暂停它?
如果移动到任务、您可以使用 Task_disable 和 Task_restore 来禁用和恢复除调用任务以外的所有其他任务。 不确定这是否是您要寻找的内容。
谢谢、
玛丽·H