nptl: Introduce THREAD_GETMEM_VOLATILE

This will be needed for rseq TCB access.

Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
This commit is contained in:
Florian Weimer 2021-12-09 09:49:32 +01:00
parent ce2248ab91
commit 8d1927d8dc
3 changed files with 6 additions and 0 deletions

View File

@ -41,6 +41,8 @@
} \
__value; })
/* THREAD_GETMEM already forces a read. */
#define THREAD_GETMEM_VOLATILE(descr, member) THREAD_GETMEM (descr, member)
/* Same as THREAD_GETMEM, but the member offset can be non-constant. */
#define THREAD_GETMEM_NC(descr, member, idx) \

View File

@ -22,6 +22,8 @@
#define THREAD_GETMEM(descr, member) \
descr->member
#define THREAD_GETMEM_VOLATILE(descr, member) \
(*(volatile __typeof (descr->member) *)&descr->member)
#define THREAD_GETMEM_NC(descr, member, idx) \
descr->member[idx]
#define THREAD_SETMEM(descr, member, value) \

View File

@ -39,6 +39,8 @@
} \
__value; })
/* THREAD_GETMEM already forces a read. */
#define THREAD_GETMEM_VOLATILE(descr, member) THREAD_GETMEM (descr, member)
/* Same as THREAD_GETMEM, but the member offset can be non-constant. */
# define THREAD_GETMEM_NC(descr, member, idx) \