(tcbhead_t): Add pointer_guard.
authordrepper <drepper>
Sun, 18 Dec 2005 06:57:32 +0000 (06:57 +0000)
committerdrepper <drepper>
Sun, 18 Dec 2005 06:57:32 +0000 (06:57 +0000)
Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.

nptl/sysdeps/i386/tls.h
nptl/sysdeps/x86_64/tls.h

index 65566ff..a870a84 100644 (file)
@@ -50,6 +50,7 @@ typedef struct
   int multiple_threads;
   uintptr_t sysinfo;
   uintptr_t stack_guard;
+  uintptr_t pointer_guard;
 } tcbhead_t;
 
 # define TLS_MULTIPLE_THREADS_IN_TCB 1
@@ -425,6 +426,14 @@ union user_desc_init
    = THREAD_GETMEM (THREAD_SELF, header.stack_guard))
 
 
+/* Set the pointer guard field in the TCB head.  */
+#define THREAD_SET_POINTER_GUARD(value) \
+  THREAD_SETMEM (THREAD_SELF, header.pointer_guard, value)
+#define THREAD_COPY_POINTER_GUARD(descr) \
+  ((descr)->header.pointer_guard                                             \
+   = THREAD_GETMEM (THREAD_SELF, header.pointer_guard))
+
+
 #endif /* __ASSEMBLER__ */
 
 #endif /* tls.h */
index 516827b..13cf6fb 100644 (file)
@@ -49,6 +49,7 @@ typedef struct
   int multiple_threads;
   uintptr_t sysinfo;
   uintptr_t stack_guard;
+  uintptr_t pointer_guard;
 } tcbhead_t;
 
 #else /* __ASSEMBLER__ */
@@ -329,6 +330,15 @@ typedef struct
     ((descr)->header.stack_guard                                             \
      = THREAD_GETMEM (THREAD_SELF, header.stack_guard))
 
+
+/* Set the pointer guard field in the TCB head.  */
+#define THREAD_SET_POINTER_GUARD(value) \
+  THREAD_SETMEM (THREAD_SELF, header.pointer_guard, value)
+#define THREAD_COPY_POINTER_GUARD(descr) \
+  ((descr)->header.pointer_guard                                             \
+   = THREAD_GETMEM (THREAD_SELF, header.pointer_guard))
+
+
 #endif /* __ASSEMBLER__ */
 
 #endif /* tls.h */