Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | get_nprocs: Only return explictly set cache values (BZ #16996) | Meador Inge | 2014-06-13 | 1 | -2/+2 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation of __get_nprocs uses a stactic variable to cache the value of the current number of processors. The caching breaks when 'time (NULL) == 0': $ cat nproc.c #include <stdio.h> #include <time.h> #include <sys/time.h> int main(int argc, char *argv[]) { time_t t; struct timeval tv = {0, 0}; printf("settimeofday({0, 0}, NULL) = %d\n", settimeofday(&tv, NULL)); t = time(NULL); printf("Time: %d, CPUs: %d\n", (unsigned int)t, get_nprocs()); return 0; } $ gcc -O3 nproc.c $ ./a.out settimeofday({0, 0}, NULL) = -1 Time: 1401311578, CPUs: 4 $ sudo ./a.out settimeofday({0, 0}, NULL) = 0 Time: 0, CPUs: 0 The problem is with the condition used to check whether a cached value should be returned or not: static int cached_result; static time_t timestamp; time_t now = time (NULL); time_t prev = timestamp; atomic_read_barrier (); if (now == prev) return cached_result; This patch fixes the problem by ensuring that 'cached_result' has been set at least once before returning it. | ||||
* | Move SPARC public headers out of nptl/ | Roland McGrath | 2014-06-12 | 1 | -0/+99 |
| | |||||
* | SPARC: Convert fork.c to arch-fork.h | Roland McGrath | 2014-06-12 | 1 | -0/+27 |
| | |||||
* | Get rid of nptl/sysdeps/pthread/ subdirectory | Roland McGrath | 2014-06-12 | 2 | -0/+60 |
| | |||||
* | Consolidate NPTL sigprocmask. | Roland McGrath | 2014-06-12 | 1 | -1/+2 |
| | |||||
* | Move SH code out of nptl/ subdirectory. | Roland McGrath | 2014-06-12 | 23 | -0/+6138 |
| | |||||
* | tile: Consolidate NPTL/non versions of vfork | Chris Metcalf | 2014-06-11 | 3 | -6/+2 |
| | |||||
* | Tile: Define TLS_DEFINE_INIT_TP | Roland McGrath | 2014-06-11 | 1 | -24/+0 |
| | |||||
* | Alpha: Define TLS_DEFINE_INIT_TP | Roland McGrath | 2014-06-11 | 1 | -22/+0 |
| | |||||
* | PowerPC: Define TLS_DEFINE_INIT_TP | Roland McGrath | 2014-06-11 | 1 | -24/+0 |
| | |||||
* | AArch64: Define TLS_DEFINE_INIT_TP | Roland McGrath | 2014-06-11 | 1 | -23/+0 |
| | |||||
* | tile: move sysdeps/unix/sysv/linux/tile nptl files. | Chris Metcalf | 2014-06-10 | 53 | -269/+5 |
| | |||||
* | hppa: Remove lowlevellock.c. | Bernard Ogden | 2014-06-09 | 1 | -126/+0 |
| | | | | | | The hppa port has no need of a custom lowlevellock.c, it should use the generic version which is updated and correct. This similarly fixes bug 15119 for hppa. | ||||
* | m68k: Define TLS_DEFINE_INIT_TP | Roland McGrath | 2014-06-09 | 1 | -24/+0 |
| | |||||
* | HPPA: Define TLS_DEFINE_INIT_TP | Roland McGrath | 2014-06-09 | 1 | -22/+0 |
| | |||||
* | MIPS: Define TLS_DEFINE_INIT_TP | Roland McGrath | 2014-06-09 | 1 | -23/+0 |
| | |||||
* | ARM: Define TLS_DEFINE_INIT_TP | Roland McGrath | 2014-06-09 | 1 | -22/+0 |
| | |||||
* | Start cleaning up TLS initial value for pthread_create. | Roland McGrath | 2014-06-09 | 1 | -48/+0 |
| | |||||
* | Fix memory overrun in getifaddrs_internal. Fixes bug 15698. | Ondřej Bílka | 2014-06-05 | 1 | -2/+2 |
| | |||||
* | aarch64: Remove nptl/vfork.S | Richard Henderson | 2014-06-03 | 1 | -37/+0 |
| | |||||
* | aarch64: Consolidate NPTL/non versions of vfork | Richard Henderson | 2014-06-03 | 3 | -44/+74 |
| | | | | | At the same time, incorporate the 0 -> 0x80000000 mapping of the pid expected by raise.c. | ||||
* | aarch64: Consolidate NPTL/non versions of clone | Richard Henderson | 2014-06-03 | 2 | -53/+24 |
| | | | | | | At the same time, rely on non-clobbered registers across syscall so that we eliminate the stack frame that we previously ignored in the unwind info. | ||||
* | SH: Consolidate NPTL/non versions of vfork | Roland McGrath | 2014-06-02 | 2 | -29/+33 |
| | |||||
* | aarch64: Remove PSEUDO_RET | Richard Henderson | 2014-05-30 | 1 | -20/+3 |
| | |||||
* | aarch64: Fix error return from __ioctl | Richard Henderson | 2014-05-30 | 1 | -6/+7 |
| | | | | | Forgotten in ca3cfa40c16ef34c74951a07a57cfcbcd58898b1 where the error branch was moved from PSEUDO_RET. | ||||
* | m68k: Convert fork.c to arch-fork.h | Roland McGrath | 2014-05-30 | 1 | -3/+2 |
| | |||||
* | aarch64: Rely on syscalls preserving registers | Richard Henderson | 2014-05-29 | 1 | -24/+12 |
| | | | | | | | | In several cases we've had asm routines rely on syscalls not clobbering call-clobbered registers, and that's now deemed ABI. So take advantage of this in the INLINE_SYSCALL path as well. Shrinks libc.so by about 1k. | ||||
* | aarch64: Use tpidr_el0 rather than __errno_location in librt | Richard Henderson | 2014-05-29 | 2 | -15/+5 |
| | |||||
* | aarch64: Use tpidr_el0 rather than __read_tp in librt | Richard Henderson | 2014-05-29 | 1 | -11/+3 |
| | |||||
* | aarch64: Improve syscall-cancel stack frame | Richard Henderson | 2014-05-29 | 1 | -86/+26 |
| | | | | One push instead of N; use stp/ldp to halve the insns. | ||||
* | aarch64: Pass regno parameter to SINGLE_THREAD_P | Richard Henderson | 2014-05-29 | 1 | -10/+8 |
| | | | | Use cbz instead of cmp+b.eq. | ||||
* | aarch64: Share code in syscall-cancel.h | Richard Henderson | 2014-05-29 | 1 | -14/+14 |
| | | | | Fold nocancel and error handling paths. | ||||
* | aarch64: Tabify sysdep-cancel.h | Richard Henderson | 2014-05-29 | 1 | -51/+51 |
| | |||||
* | Avoid stat/fstat in statvfs/fstatvfs (BZ #15132) | Eric Wong | 2014-05-29 | 5 | -27/+18 |
| | | | | | Delay the use of stat/fstat until stat data is required. When the kernel returns ST_VALID, stat data is not used by __internal_statvfs. | ||||
* | SH: Consolidate NPTL/non versions of clone | Roland McGrath | 2014-05-28 | 1 | -6/+1 |
| | |||||
* | tile: Convert fork.c to arch-fork.h | Roland McGrath | 2014-05-28 | 1 | -4/+2 |
| | |||||
* | IA64: Convert fork.c to arch-fork.h | Roland McGrath | 2014-05-27 | 1 | -0/+29 |
| | |||||
* | SH: Convert fork.c to arch-fork.h | Roland McGrath | 2014-05-27 | 1 | -0/+28 |
| | |||||
* | PowerPC: Move remaining nptl/sysdeps/unix/sysv/linux/powerpc/ files. | Adhemerval Zanella | 2014-05-26 | 13 | -0/+944 |
| | |||||
* | PowerPC: Move NPTL ABI headers to sysdeps. | Adhemerval Zanella | 2014-05-26 | 2 | -0/+266 |
| | |||||
* | PowerPC: Move powerpc64 timer_*.c out of nptl/ | Adhemerval Zanella | 2014-05-26 | 6 | -0/+13 |
| | |||||
* | PowerPC: Consolidate NPTL/non versions of clone | Adhemerval Zanella | 2014-05-26 | 2 | -27/+2 |
| | |||||
* | PowerPC: Consolidate NPTL/non versions of vfork | Adhemerval Zanella | 2014-05-26 | 2 | -0/+59 |
| | |||||
* | arm,aarch64: Remove SINGLE_THREAD_P_PIC | Richard Henderson | 2014-05-25 | 2 | -2/+0 |
| | | | | | | | | | | This macro was removed by 2005-11-16 Daniel Jacobowitz <dan@codesourcery.com> but not applied to the (still separate) eabi port so necro'd when the eabi port superceded the old abi. It was thence copied into the new AArch64 port. | ||||
* | aarch64: Tidy syscall error check | Richard Henderson | 2014-05-25 | 2 | -10/+13 |
| | | | | | Move the error branch from the PSEUDO_RET macro to the PSEUDO macro. This is in line with other architectures, and will enable further improvments. | ||||
* | aarch64: Remove DOARGS/UNDOARGS macros | Richard Henderson | 2014-05-25 | 2 | -24/+1 |
| | | | | While they do something for AArch32, they're useless for AArch64. | ||||
* | aarch64: Fix DO_CALL block comment | Richard Henderson | 2014-05-25 | 1 | -1/+1 |
| | |||||
* | alpha: Do non-default symbols in pt-vfork.S | Richard Henderson | 2014-05-25 | 2 | -6/+14 |
| | |||||
* | alpha: Move remaining files out of sysdeps/unix/sysv/linux/alpha/nptl/ | Richard Henderson | 2014-05-23 | 32 | -15/+16 |
| | |||||
* | alpha: Consolidate NPTL/non versions of vfork | Richard Henderson | 2014-05-23 | 4 | -59/+62 |
| |