#ifdef __UCLIBC_HAS_THREADS_NATIVE__
LIBC_CANCEL_HANDLED (); /* sigsuspend handles our cancellation. */
#endif
+
.align 2; \
1: .long SYS_ify (syscall_name); \
2:
-
#endif /* __ASSEMBLER__ */
+
+/* Pointer mangling support. */
+#if defined NOT_IN_libc && defined IS_IN_rtld
+/* We cannot use the thread descriptor because in ld.so we use setjmp
+ earlier than the descriptor is initialized. Using a global variable
+ is too complicated here since we have no PC-relative addressing mode. */
+#else
+# ifdef __ASSEMBLER__
+# define PTR_MANGLE(reg, tmp) \
+ stc gbr,tmp; mov.l @(POINTER_GUARD,tmp),tmp; xor tmp,reg
+# define PTR_MANGLE2(reg, tmp) xor tmp,reg
+# define PTR_DEMANGLE(reg, tmp) PTR_MANGLE (reg, tmp)
+# define PTR_DEMANGLE2(reg, tmp) PTR_MANGLE2 (reg, tmp)
+# else
+# define PTR_MANGLE(var) \
+ (var) = (void *) ((uintptr_t) (var) ^ THREAD_GET_POINTER_GUARD ())
+# define PTR_DEMANGLE(var) PTR_MANGLE (var)
+# endif
+#endif
+
pthread_yield.c sem_post.c sem_timedwait.c \
pthread_sigqueue.c \
sem_trywait.c sem_wait.c pt-fork.c \
- sigtimedwait.c sigwaitinfo.c sigwait.c pt-sleep.c \
- lowlevelrobustlock.c
+ sigtimedwait.c sigwaitinfo.c sigwait.c pt-sleep.c
libpthread_SSRC = #ptw-close.S ptw-open.S ptw-waitid.S ptw-waidpid.S ptw-write.S
ifeq ($(TARGET_ARCH),arm)
libc_SSRC := $(filter-out waitpid.S,$(libc_SSRC))
+libpthread_CSRC += lowlevelrobustlock.c
endif
ifeq ($(TARGET_ARCH),mips)
-libpthread_CSRC += lowlevellock.c
+libpthread_CSRC += lowlevellock.c lowlevelrobustlock.c
libc_CSRC += libc-lowlevellock.c
endif
#include <pthread-errnos.h>
#include <bits/kernel-features.h>
#include <lowlevellock.h>
+#include <tcb-offsets.h>
#include "lowlevel-atomic.h"
.text
#include <bits/kernel-features.h>
#endif
-#define SYS_futex 240
#define FUTEX_WAIT 0
#define FUTEX_WAKE 1
#define FUTEX_CMP_REQUEUE 4
#include <lowlevellock.h>
#include <lowlevelrobustlock.h>
#include <bits/kernel-features.h>
+#include <tcb-offsets.h>
#include "lowlevel-atomic.h"
.text
+++ /dev/null
-#include "../i386/not-cancel.h"
#include <bits/kernel-features.h>
#include <pthread-pi-defines.h>
#include <pthread-errnos.h>
+#include <tcb-offsets.h>
#include "lowlevel-atomic.h"
.text
#include <lowlevelcond.h>
#include <bits/kernel-features.h>
#include <pthread-errnos.h>
+#include <tcb-offsets.h>
#include "lowlevel-atomic.h"
.text
#include <sysdep.h>
#include <bits/kernel-features.h>
#include <lowlevellock.h>
+#include <tcb-offsets.h>
#include "lowlevel-atomic.h"
#include <lowlevellock.h>
#include <lowlevelrwlock.h>
#include <bits/kernel-features.h>
+#include <tcb-offsets.h>
#include "lowlevel-atomic.h"
.word PID - TLS_PRE_TCB_SIZE
.align 2
PSEUDO_END (__vfork)
-libc_hidden_def (__vfork)
+hidden_def (vfork)
weak_alias (__vfork, vfork)