mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
nptl: Return EINVAL for invalid clock for pthread_clockjoin_np
The align the GNU extension with the others one that accept specify which clock to wait for (such as pthread_mutex_clocklock). Check on x86_64-linux-gnu. Reviewed-by: Lukasz Majewski <lukma@denx.de>
This commit is contained in:
@ -17,12 +17,16 @@
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <time.h>
|
||||
#include <futex-internal.h>
|
||||
#include "pthreadP.h"
|
||||
|
||||
int
|
||||
__pthread_clockjoin_np64 (pthread_t threadid, void **thread_return,
|
||||
clockid_t clockid, const struct __timespec64 *abstime)
|
||||
{
|
||||
if (!futex_abstimed_supported_clockid (clockid))
|
||||
return EINVAL;
|
||||
|
||||
return __pthread_clockjoin_ex (threadid, thread_return,
|
||||
clockid, abstime, true);
|
||||
}
|
||||
|
Reference in New Issue
Block a user