mlock, mlock2, munlock: Use __attr_access_none macro

This fixes build failures using GCC 7.5.0 against glibc headers,
see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118194#c5.

Followup to 013106ae67.

Reported-by: vvinayag@arm.com
This commit is contained in:
Sam James 2025-01-02 17:26:28 +00:00
parent 0ab62fa4f6
commit e9be7701e6
No known key found for this signature in database
GPG Key ID: 738409F520DF9190
2 changed files with 3 additions and 3 deletions

View File

@ -101,11 +101,11 @@ extern int posix_madvise (void *__addr, size_t __len, int __advice) __THROW;
/* Guarantee all whole pages mapped by the range [ADDR,ADDR+LEN) to
be memory resident. */
extern int mlock (const void *__addr, size_t __len) __THROW
__attr_access ((__none__, 1));
__attr_access_none (1);
/* Unlock whole pages previously mapped by the range [ADDR,ADDR+LEN). */
extern int munlock (const void *__addr, size_t __len) __THROW
__attr_access ((__none__, 1));
__attr_access_none (1);
/* Cause all currently mapped pages of the process to be memory resident
until unlocked by a call to the `munlockall', until the process exits,

View File

@ -57,7 +57,7 @@ int memfd_create (const char *__name, unsigned int __flags) __THROW;
/* Lock pages from ADDR (inclusive) to ADDR + LENGTH (exclusive) into
memory. FLAGS is a combination of the MLOCK_* flags above. */
int mlock2 (const void *__addr, size_t __length, unsigned int __flags) __THROW
__attr_access ((__none__, 1));
__attr_access_none (1);
/* Allocate a new protection key, with the PKEY_DISABLE_* bits
specified in ACCESS_RESTRICTIONS. The protection key mask for the