1
0
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:
Adhemerval Zanella
2020-11-23 13:47:18 -03:00
parent 74f418b29d
commit b4c3446836
4 changed files with 92 additions and 1 deletions

View File

@ -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);
}