* @brief Get the scheduling policy of a thread. * * This function retrieves the current scheduling policy of the specified thread. * * @param[in] tid The thread ID of the target thread. * * @return sysret_t Returns the scheduling policy of the thread on success. On failure, * returns a negative error code. * * @note The caller must have appropriate permissions to query th
| 8981 | * of the specified thread. |
| 8982 | */ |
| 8983 | sysret_t sys_sched_getscheduler(int tid) |
| 8984 | { |
| 8985 | rt_thread_t thread = RT_NULL; |
| 8986 | int rtn; |
| 8987 | |
| 8988 | thread = lwp_tid_get_thread_and_inc_ref(tid); |
| 8989 | lwp_tid_dec_ref(thread); |
| 8990 | |
| 8991 | if (thread) |
| 8992 | { |
| 8993 | rtn = SCHED_RR; |
| 8994 | } |
| 8995 | else |
| 8996 | { |
| 8997 | rtn = -ESRCH; |
| 8998 | } |
| 8999 | |
| 9000 | return rtn; |
| 9001 | } |
| 9002 | |
| 9003 | /** |
| 9004 | * @brief Flush the file descriptors' data to disk. |
nothing calls this directly
no test coverage detected