* @brief Fetches a robust futex list entry from user space * * @param[out] entry Pointer to store the retrieved robust list entry * @param[in] head Pointer to the head of the robust list in user space * @param[out] is_pi Pointer to store the PI flag status * * @return Operation status * - 0 on success * - EFAULT if user space access fails * * @note This helper function sa
| 1028 | * from user space and extracts the PI (Priority Inheritance) flag. |
| 1029 | */ |
| 1030 | rt_inline int _fetch_robust_entry(struct robust_list **entry, |
| 1031 | struct robust_list **head, rt_bool_t *is_pi) |
| 1032 | { |
| 1033 | unsigned long uentry; |
| 1034 | |
| 1035 | if (!lwp_user_accessable((void *)head, sizeof(*head))) |
| 1036 | { |
| 1037 | return -EFAULT; |
| 1038 | } |
| 1039 | |
| 1040 | if (lwp_get_from_user(&uentry, (void *)head, sizeof(*head)) != |
| 1041 | sizeof(*head)) |
| 1042 | { |
| 1043 | return -EFAULT; |
| 1044 | } |
| 1045 | |
| 1046 | *entry = (void *)(uentry & ~1UL); |
| 1047 | *is_pi = uentry & 1; |
| 1048 | |
| 1049 | return 0; |
| 1050 | } |
| 1051 | |
| 1052 | /** |
| 1053 | * @brief Handles futex cleanup when a thread dies |
no test coverage detected