mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-08-23 10:19:59 +00:00
porting/npl/linux: Replace pthread_yield() with sched_yield()
Per `pthread_yield(3)`: ``` This call is nonstandard, but present on several other systems. Use the standardized sched_yield(2) instead. ```
This commit is contained in:
committed by
Andrzej Kaczmarek
parent
18738b2743
commit
188256f1ef
@@ -17,6 +17,8 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
#include <sched.h>
|
||||
|
||||
#include "os/os.h"
|
||||
#include "nimble/nimble_npl.h"
|
||||
|
||||
@@ -106,7 +108,7 @@ bool ble_npl_os_started(void)
|
||||
|
||||
void ble_npl_task_yield(void)
|
||||
{
|
||||
pthread_yield();
|
||||
sched_yield();
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user