kernel & libroot: Drop wait_for_thread syscall in favor of wait_for_thread_etc.

We don't have many etc and non-etc syscall pairs in this file
(the semaphores seem to be a notable exception), so drop
wait_for_thread and just call wait_for_thread_etc instead.

This breaks syscall ABI, but we've already broken it since beta5
anyway.
This commit is contained in:
Augustin Cavalier
2025-01-15 14:52:15 -05:00
parent 26cf47386e
commit f3f347f90d
3 changed files with 1 additions and 23 deletions
-2
View File
@@ -173,8 +173,6 @@ extern void _kern_exit_thread(status_t returnValue);
extern status_t _kern_cancel_thread(thread_id threadID, extern status_t _kern_cancel_thread(thread_id threadID,
void (*cancelFunction)(int)); void (*cancelFunction)(int));
extern void _kern_thread_yield(void); extern void _kern_thread_yield(void);
extern status_t _kern_wait_for_thread(thread_id thread,
status_t *_returnCode);
extern status_t _kern_wait_for_thread_etc(thread_id thread, uint32 flags, extern status_t _kern_wait_for_thread_etc(thread_id thread, uint32 flags,
bigtime_t timeout, status_t *_returnCode); bigtime_t timeout, status_t *_returnCode);
extern bool _kern_has_data(thread_id thread); extern bool _kern_has_data(thread_id thread);
-20
View File
@@ -3717,26 +3717,6 @@ _user_find_thread(const char *userName)
} }
status_t
_user_wait_for_thread(thread_id id, status_t *userReturnCode)
{
status_t returnCode;
status_t status;
if (userReturnCode != NULL && !IS_USER_ADDRESS(userReturnCode))
return B_BAD_ADDRESS;
status = wait_for_thread_etc(id, B_CAN_INTERRUPT, 0, &returnCode);
if (status == B_OK && userReturnCode != NULL
&& user_memcpy(userReturnCode, &returnCode, sizeof(status_t)) < B_OK) {
return B_BAD_ADDRESS;
}
return syscall_restart_handle_post(status);
}
status_t status_t
_user_wait_for_thread_etc(thread_id id, uint32 flags, bigtime_t timeout, status_t *userReturnCode) _user_wait_for_thread_etc(thread_id id, uint32 flags, bigtime_t timeout, status_t *userReturnCode)
{ {
+1 -1
View File
@@ -179,7 +179,7 @@ exit_thread(status_t status)
status_t status_t
wait_for_thread(thread_id thread, status_t *_returnCode) wait_for_thread(thread_id thread, status_t *_returnCode)
{ {
return _kern_wait_for_thread(thread, _returnCode); return _kern_wait_for_thread_etc(thread, 0, 0, _returnCode);
} }