diff options
Diffstat (limited to 'libc/ports/sysdeps/unix/sysv')
14 files changed, 51 insertions, 73 deletions
diff --git a/libc/ports/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h b/libc/ports/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h index 31258e420..5ab9ac43a 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h +++ b/libc/ports/sysdeps/unix/sysv/linux/alpha/bits/typesizes.h @@ -50,7 +50,6 @@ #define __USECONDS_T_TYPE __U32_TYPE #define __SUSECONDS_T_TYPE __S64_TYPE #define __DADDR_T_TYPE __S32_TYPE -#define __SWBLK_T_TYPE __SLONGWORD_TYPE #define __KEY_T_TYPE __S32_TYPE #define __CLOCKID_T_TYPE __S32_TYPE #define __TIMER_T_TYPE void * diff --git a/libc/ports/sysdeps/unix/sysv/linux/alpha/clone.S b/libc/ports/sysdeps/unix/sysv/linux/alpha/clone.S index 1c6c8d6b7..b92b6c2e7 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/alpha/clone.S +++ b/libc/ports/sysdeps/unix/sysv/linux/alpha/clone.S @@ -35,89 +35,84 @@ we don't bother checking FLAGS. */ .text -ENTRY(__clone) + .align 4 + .globl __clone + .ent __clone + .usepv __clone, USEPV_PROF + + cfi_startproc +__clone: #ifdef PROF ldgp gp,0(pv) - .set noat lda AT, _mcount jsr AT, (AT), _mcount - .set at - .prologue 1 -#else - .prologue 0 #endif /* Sanity check arguments. */ - ldiq v0,EINVAL - beq a0,$error /* no NULL function pointers */ - beq a1,$error /* no NULL stack pointers */ + ldiq v0, EINVAL + beq a0, SYSCALL_ERROR_LABEL /* no NULL function pointers */ + beq a1, SYSCALL_ERROR_LABEL /* no NULL stack pointers */ /* Save the fn ptr and arg on the new stack. */ - subq a1,32,a1 - stq a0,0(a1) - stq a3,8(a1) + subq a1, 32, a1 + stq a0, 0(a1) + stq a3, 8(a1) #ifdef RESET_PID - stq a2,16(a1) + stq a2, 16(a1) #endif /* The syscall is of the form clone(flags, usp, ptid, ctid, tls). Shift the flags, ptid, ctid, tls arguments into place; the child_stack argument is already correct. */ - mov a2,a0 - mov a4,a2 - ldq a3,0(sp) - mov a5,a4 + mov a2, a0 + mov a4, a2 + ldq a3, 0(sp) + mov a5, a4 /* Do the system call. */ - ldiq v0,__NR_clone + ldiq v0, __NR_clone call_pal PAL_callsys - bne a3,$error - beq v0,thread_start + bne a3, SYSCALL_ERROR_LABEL + beq v0, thread_start /* Successful return from the parent. */ ret - /* Something bad happened -- no child created. */ -$error: -#ifndef PROF - br gp,1f -1: ldgp gp,0(gp) -#endif - SYSCALL_ERROR_HANDLER - - END(__clone) +PSEUDO_END(__clone) + cfi_endproc /* Load up the arguments to the function. Put this block of code in its own function so that we can terminate the stack trace with our debug info. */ .ent thread_start + cfi_startproc thread_start: - .frame fp,0,fp,0 mov 0, fp - .prologue 0 + cfi_def_cfa_register(fp) + cfi_undefined(ra) #ifdef RESET_PID /* Check and see if we need to reset the PID. */ - ldq t0,16(sp) - lda t1,CLONE_THREAD - and t0,t1,t2 - beq t2,2f + ldq t0, 16(sp) + lda t1, CLONE_THREAD + and t0, t1, t2 + beq t2, 2f 1: #endif /* Load up the arguments. */ - ldq pv,0(sp) - ldq a0,8(sp) - addq sp,32,sp + ldq pv, 0(sp) + ldq a0, 8(sp) + addq sp, 32, sp /* Call the user's function. */ - jsr ra,(pv) - ldgp gp,0(ra) + jsr ra, (pv) + ldgp gp, 0(ra) /* Call _exit rather than doing it inline for breakpoint purposes. */ - mov v0,a0 + mov v0, a0 #ifdef PIC bsr ra, HIDDEN_JUMPTARGET(_exit) !samegp #else @@ -142,7 +137,7 @@ thread_start: stl v0, TID_OFFSET(s0) br 1b #endif - + cfi_endproc .end thread_start weak_alias (__clone, clone) diff --git a/libc/ports/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h b/libc/ports/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h index ac364dae1..0ef2e7fd3 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h +++ b/libc/ports/sysdeps/unix/sysv/linux/alpha/nptl/lowlevellock.h @@ -259,7 +259,7 @@ __lll_robust_timedlock (int *futex, const struct timespec *abstime, #define LLL_LOCK_INITIALIZER_LOCKED (1) -/* The kernel notifies a process which uses CLONE_CLEARTID via futex +/* The kernel notifies a process which uses CLONE_CHILD_CLEARTID via futex wakeup when the clone terminates. The memory location contains the thread ID while the clone is running and is reset to zero afterwards. */ diff --git a/libc/ports/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h b/libc/ports/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h index 04c7af472..e6795d98f 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h +++ b/libc/ports/sysdeps/unix/sysv/linux/alpha/nptl/sysdep-cancel.h @@ -23,16 +23,6 @@ #if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt -# ifdef PROF -# define PSEUDO_PROF \ - .set noat; \ - lda AT, _mcount; \ - jsr AT, (AT), _mcount; \ - .set at -# else -# define PSEUDO_PROF -# endif - /* ??? Assumes that nothing comes between PSEUDO and PSEUDO_END besides "ret". */ @@ -88,7 +78,7 @@ __LABEL($multi_error) \ addq sp, 64, sp; \ cfi_restore(ra); \ cfi_def_cfa_offset(0); \ -__LABEL($syscall_error) \ + SYSCALL_ERROR_FALLTHRU; \ SYSCALL_ERROR_HANDLER; \ cfi_endproc; \ .previous diff --git a/libc/ports/sysdeps/unix/sysv/linux/alpha/syscall.S b/libc/ports/sysdeps/unix/sysv/linux/alpha/syscall.S index 830b10acb..5cec3800e 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/alpha/syscall.S +++ b/libc/ports/sysdeps/unix/sysv/linux/alpha/syscall.S @@ -62,16 +62,9 @@ LEAF(__syscall, 0) ldq a5,0(sp) /* arg6 -> a5 */ call_pal PAL_callsys /* Invoke system call */ - bne a3, $error + bne a3, SYSCALL_ERROR_LABEL ret -$error: -#ifndef PROF - br gp, 2f -2: ldgp gp, 0(gp) -#endif - SYSCALL_ERROR_HANDLER - -END(__syscall) +PSEUDO_END(__syscall) weak_alias (__syscall, syscall) diff --git a/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h b/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h index b9fa69ce3..5811361e3 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h +++ b/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h @@ -256,7 +256,7 @@ extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *, 1 - taken by one user >1 - taken by more users */ -/* The kernel notifies a process which uses CLONE_CLEARTID via futex +/* The kernel notifies a process which uses CLONE_CHILD_CLEARTID via futex wakeup when the clone terminates. The memory location contains the thread ID while the clone is running and is reset to zero afterwards. */ diff --git a/libc/ports/sysdeps/unix/sysv/linux/generic/bits/typesizes.h b/libc/ports/sysdeps/unix/sysv/linux/generic/bits/typesizes.h index d7d2a5c10..d5799d185 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/generic/bits/typesizes.h +++ b/libc/ports/sysdeps/unix/sysv/linux/generic/bits/typesizes.h @@ -52,7 +52,6 @@ #define __USECONDS_T_TYPE __U32_TYPE #define __SUSECONDS_T_TYPE __SLONGWORD_TYPE #define __DADDR_T_TYPE __S32_TYPE -#define __SWBLK_T_TYPE __SLONGWORD_TYPE #define __KEY_T_TYPE __S32_TYPE #define __CLOCKID_T_TYPE __S32_TYPE #define __TIMER_T_TYPE void * diff --git a/libc/ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h b/libc/ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h index 6d4b13517..ad601c683 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h +++ b/libc/ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h @@ -319,7 +319,7 @@ __lll_robust_timedlock (int *futex, const struct timespec *abstime, extern int lll_unlock_wake_cb (lll_lock_t *__futex) attribute_hidden; -/* The kernel notifies a process which uses CLONE_CLEARTID via futex +/* The kernel notifies a process which uses CLONE_CHILD_CLEARTID via futex wakeup when the clone terminates. The memory location contains the thread ID while the clone is running and is reset to zero afterwards. */ diff --git a/libc/ports/sysdeps/unix/sysv/linux/ia64/nptl/lowlevellock.h b/libc/ports/sysdeps/unix/sysv/linux/ia64/nptl/lowlevellock.h index 24ed47e22..e36ff2653 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/ia64/nptl/lowlevellock.h +++ b/libc/ports/sysdeps/unix/sysv/linux/ia64/nptl/lowlevellock.h @@ -267,7 +267,7 @@ extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *, #define LLL_LOCK_INITIALIZER (0) #define LLL_LOCK_INITIALIZER_LOCKED (1) -/* The kernel notifies a process with uses CLONE_CLEARTID via futex +/* The kernel notifies a process which uses CLONE_CHILD_CLEARTID via futex wakeup when the clone terminates. The memory location contains the thread ID while the clone is running and is reset to zero afterwards. */ diff --git a/libc/ports/sysdeps/unix/sysv/linux/m68k/init-first.c b/libc/ports/sysdeps/unix/sysv/linux/m68k/init-first.c index ec311ec42..713ab86b1 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/m68k/init-first.c +++ b/libc/ports/sysdeps/unix/sysv/linux/m68k/init-first.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2010 Free Software Foundation, Inc. +/* Initialization code run first thing by the ELF startup code. Linux/m68k. + Copyright (C) 2010-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Maxim Kuvyrkov <maxim@codesourcery.com>, 2010. @@ -70,4 +71,4 @@ _libc_vdso_platform_setup (void) #endif /* SHARED */ -#include <sysdeps/unix/sysv/linux/init-first.c> +#include <csu/init-first.c> diff --git a/libc/ports/sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h b/libc/ports/sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h index fed152ae3..4dbed8d37 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h +++ b/libc/ports/sysdeps/unix/sysv/linux/m68k/nptl/lowlevellock.h @@ -254,7 +254,7 @@ extern int __lll_robust_timedlock_wait (int *futex, const struct timespec *, 1 - taken by one user >1 - taken by more users */ -/* The kernel notifies a process which uses CLONE_CLEARTID via futex +/* The kernel notifies a process which uses CLONE_CHILD_CLEARTID via futex wakeup when the clone terminates. The memory location contains the thread ID while the clone is running and is reset to zero afterwards. */ diff --git a/libc/ports/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h b/libc/ports/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h index d368ae1b6..9c1701167 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h +++ b/libc/ports/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h @@ -268,7 +268,7 @@ __lll_robust_timedlock (int *futex, const struct timespec *abstime, 1 - taken by one user >1 - taken by more users */ -/* The kernel notifies a process which uses CLONE_CLEARTID via futex +/* The kernel notifies a process which uses CLONE_CHILD_CLEARTID via futex wakeup when the clone terminates. The memory location contains the thread ID while the clone is running and is reset to zero afterwards. */ diff --git a/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist b/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist index 11ad6a525..481162e99 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist +++ b/libc/ports/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/libc.abilist @@ -1775,6 +1775,7 @@ GLIBC_2.16 GLIBC_2.17 GLIBC_2.17 A secure_getenv F + __ppc_get_timebase_freq F GLIBC_2.2 GLIBC_2.2 A _IO_adjust_wcolumn F diff --git a/libc/ports/sysdeps/unix/sysv/linux/tile/nptl/lowlevellock.h b/libc/ports/sysdeps/unix/sysv/linux/tile/nptl/lowlevellock.h index 8690c7be4..0e0d48ed0 100644 --- a/libc/ports/sysdeps/unix/sysv/linux/tile/nptl/lowlevellock.h +++ b/libc/ports/sysdeps/unix/sysv/linux/tile/nptl/lowlevellock.h @@ -255,7 +255,7 @@ __lll_robust_timedlock (int *futex, const struct timespec *abstime, #define LLL_LOCK_INITIALIZER_LOCKED (1) -/* The kernel notifies a process which uses CLONE_CLEARTID via futex +/* The kernel notifies a process which uses CLONE_CHILD_CLEARTID via futex wakeup when the clone terminates. The memory location contains the thread ID while the clone is running and is reset to zero afterwards. */ |