* @brief Add current thread into futex waiting thread list * * @param[in] thread The thread to be suspended * @param[in] futex The futex to add thread to waiting list * * @return rt_err_t Returns RT_EOK on success or error code on failure */
| 473 | * @return rt_err_t Returns RT_EOK on success or error code on failure |
| 474 | */ |
| 475 | static rt_err_t _suspend_thread_locked(rt_thread_t thread, rt_futex_t futex) |
| 476 | { |
| 477 | /** |
| 478 | * Brief: Add current thread into futex waiting thread list |
| 479 | * |
| 480 | * Note: Critical Section |
| 481 | * - the futex waiting_thread list (RW) |
| 482 | */ |
| 483 | return rt_thread_suspend_to_list(thread, &futex->waiting_thread, |
| 484 | RT_IPC_FLAG_FIFO, RT_INTERRUPTIBLE); |
| 485 | } |
| 486 | |
| 487 | /** |
| 488 | * @brief Compare and exchange futex value atomically |
no test coverage detected