mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
Linux: mlock2 syscall number is always available
Due to the built-in tables, __NR_mlock2 is always defined. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This commit is contained in:
@ -27,11 +27,9 @@ mlock2 (const void *addr, size_t length, unsigned int flags)
|
|||||||
#else
|
#else
|
||||||
if (flags == 0)
|
if (flags == 0)
|
||||||
return INLINE_SYSCALL_CALL (mlock, addr, length);
|
return INLINE_SYSCALL_CALL (mlock, addr, length);
|
||||||
# ifdef __NR_mlock2
|
|
||||||
int ret = INLINE_SYSCALL_CALL (mlock2, addr, length, flags);
|
int ret = INLINE_SYSCALL_CALL (mlock2, addr, length, flags);
|
||||||
if (ret == 0 || errno != ENOSYS)
|
if (ret == 0 || errno != ENOSYS)
|
||||||
return ret;
|
return ret;
|
||||||
# endif /* __NR_mlock2 */
|
|
||||||
/* Treat the missing system call as an invalid (non-zero) flag
|
/* Treat the missing system call as an invalid (non-zero) flag
|
||||||
argument. */
|
argument. */
|
||||||
__set_errno (EINVAL);
|
__set_errno (EINVAL);
|
||||||
|
Reference in New Issue
Block a user