History log of /bionic/libc/unistd/sysconf.c
Revision Date Author Comments
a985076bfe8c89f932fe33be45b887405c4fe7e3 06-Jun-2012 Elliott Hughes <enh@google.com> Fix sysconf(_SC_NPROCESSORS_CONF) on ARM.

Bug: http://code.google.com/p/enh/issues/detail?id=33
Change-Id: I679b4cd888d362031042284e8edf01c5273a92aa
519763265ec0b634bd9c264a0aca034882458ecc 28-Jun-2010 David 'Digit' Turner <digit@google.com> libc: Fix sem_post() implementation to wake up all waiting threads.

This also allows us to optimize the case where we increment an
uncontended semaphore (no need to call futex_wake() then).

Change-Id: Iad48efe8551dc66dc89d3e3f18c001e5a6c1939f
50ace4fec5e8cb5afcbc656a4556fa528adfd760 17-Jun-2010 David 'Digit' Turner <digit@google.com> Remove compiler warnings when building Bionic.

Also add missing declarations to misc. functions.
Fix clearerr() implementation (previous was broken).
Handle feature test macros like _POSIX_C_SOURCE properly.

Change-Id: Icdc973a6b9d550a166fc2545f727ea837fe800c4
b44fcd6e8f661e7e795212a3b68aa171ab6e49c9 21-May-2010 Mikael Ohlson <mikael.ohlson@stericsson.com> Fix for incorrect reply from sysconf(_SC_NPROCESSORS_ONLN)

When calling sysconf with _SC_NPROCESSORS_ONLN, the value one (1) was
returned on systems with two or more cores, since '/proc/stat' was
incorrectly parsed.

The function line_parser_getc (LineParser* p) read 128 characters of
input for each invocation.

The proper and probably aimed for behavior is to read 128 characters
at the first call, then for each subsequent call only return the next
buffered character until a new read is needed and only then read
another 128 characters.

Due to a flipped comparison between the two variables in_len and
in_pos that track the number of bytes of data read into the input
buffer and how much of it has been parsed, a new group of 128
characters were read at almost every call to line_parser_getc,
overwriting the still unhandled bytes from the previous call to
read. This caused the lines to be read to be sampled more than parsed.

Change-Id: I93eec3c8c9b9f19ef798748579d0977111b5c0bb

Signed-off-by: Christian Bejram <christian.bejram@stericsson.com>
038fbae518e904c7aba64779714a22dbeeb90887 10-Jun-2010 David 'Digit' Turner <digit@google.com> sysconf(): Fix line parser for /proc files.

Change-Id: I2678010ee95933de19c8a8e3b2fe65ceb9b86400
1dc9e472e19acfe6dc7f41e429236e7eef7ceda1 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
1767f908af327fa388b1c66883760ad851267013 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
e5cc1f386b167b9f7bfdebc7219e89aa9b71e4b2 16-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@126645
a27d2baa0c1a2ec70f47ea9199b1dd6762c8a349 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution