Commit graph

6692 commits

Author SHA1 Message Date
Elliott Hughes
a0bf9bdea2 Merge "Implement POSIX pthread_mutex_timedlock." 2014-03-04 18:39:08 +00:00
Elliott Hughes
0e714a5b41 Implement POSIX pthread_mutex_timedlock.
This replaces the non-standard pthread_mutex_lock_timeout_np, which we have
to keep around on LP32 for binary compatibility.

Change-Id: I098dc7cd38369f0c1bec1fac35687fbd27392e00
2014-03-04 10:27:58 -08:00
Calin Juravle
8e541b1223 Merge "Moved nameser.h and namser_compat.h to public include dir" 2014-03-04 17:53:19 +00:00
Calin Juravle
569fb9887d Moved nameser.h and namser_compat.h to public include dir
This is part of the upstream sync (Net/Open/Free BSDs expose the
nameser.h in their public headers).

Change-Id: Ib063d4e50586748cc70201a8296cd90d2e48bbcf
2014-03-04 15:07:07 +00:00
Calin Juravle
4a46a68942 Merge "Moved private dns header to their own dir." 2014-03-04 14:25:51 +00:00
Calin Juravle
9f2d1bcd17 Merge "Renamed the misleading libc/netbsd directory to libc/dns." 2014-03-04 14:25:30 +00:00
Narayan Kamath
caaae7f2e9 Merge "Implement pthread_condattr_{get,set}clock." 2014-03-04 13:37:07 +00:00
Narayan Kamath
51e6cb33e3 Implement pthread_condattr_{get,set}clock.
We only support CLOCK_REALTIME and CLOCK_MONOTONIC for now,
so we us a single bit from pthread_cond_t->value to denote
the clock type. Note that this reduces the width of the counter
to 30 bits, but this should be large enough for all practical
purposes.

bug: 13232338

Change-Id: I857e7da64b3ecbb23eeac7c9f3fbd460f60231bd
2014-03-04 11:17:13 +00:00
Elliott Hughes
2c7c79e6e5 Merge "Switch to upstream alarm(3)." 2014-03-04 00:58:53 +00:00
Elliott Hughes
aedb00d04e Switch to upstream alarm(3).
The only way the setitimer call can fail is if the unsigned number of seconds is
too large to fit in the kernel's signed number of seconds. If you schedule a
68-year alarm, glibc will fail by returning 0 and BSD will fail by returning -1.

Change-Id: Ic3721b01428f5402d99f31fd7f2ba2cc58805607
2014-03-04 00:58:31 +00:00
Mark Salyzyn
f33df6a662 Merge "libc: Make calls to new user-space logger (revisit)" 2014-03-03 21:05:19 +00:00
Calin Juravle
cecc036970 Moved private dns header to their own dir.
Bug: 13219633
Change-Id: I3435ef7564b9ad3c7b54188a0809440993b36c9e
2014-03-03 20:40:41 +00:00
Mark Salyzyn
f38292862b libc: Make calls to new user-space logger (revisit)
* TARGET_USES_LOGD is true or false, yes is not valid
* was supposed to be in the libc_bionic definition

Change-Id: I7f15d0fe61205641f7310ba9762df885e6c959d0
2014-03-03 12:30:24 -08:00
Elliott Hughes
dfeb42ede6 Merge "If the kernel doesn't have MADV_MERGEABLE, stop asking for it." 2014-03-03 20:26:12 +00:00
Elliott Hughes
9bd9b7dd20 If the kernel doesn't have MADV_MERGEABLE, stop asking for it.
Note that a dynamically-linked binary will still probably see two attempts ---
one by the dynamic linker (which will set its copy of the flag so it won't try
again) and then one by the executable itself (which gets a new uninitialized
copy of the flag).

Change-Id: Id6b7e47780f0f24d2ca0384a75373f4824fa8f12
2014-03-03 11:54:21 -08:00
Elliott Hughes
15e71cd760 Merge "Remove deprecated and unused constants from <sys/klog.h>." 2014-03-03 19:01:50 +00:00
Elliott Hughes
e4ab19c67d Remove deprecated and unused constants from <sys/klog.h>.
Change-Id: I23d54b5eaf918859480f927534a3f9e3af602311
2014-03-03 10:57:28 -08:00
Elliott Hughes
ddad384dbf Merge "Fix build." 2014-03-01 01:59:55 +00:00
Elliott Hughes
a8b1eb3fcf Fix build.
Change-Id: I71cde79263d5f5a8382865b8151f65c5c05ea17b
2014-02-28 17:59:29 -08:00
Elliott Hughes
2ec592c338 Merge "Add recvmmsg and sendmmsg syscalls." 2014-03-01 01:14:23 +00:00
Elliott Hughes
ddc8cc7a68 Merge "Add getprogname/setprogname for BSD compatibility." 2014-03-01 01:12:12 +00:00
Elliott Hughes
692207eb45 Add getprogname/setprogname for BSD compatibility.
This is one less change we have to make when porting BSD code.

Bug: https://code.google.com/p/android/issues/detail?id=34898
Change-Id: If9b1a8d16996c7a19abcce8d3a456afc3e105a41
2014-02-28 16:23:27 -08:00
Calin Juravle
d51db86aaf Merge "Fix locatime.c indentation after sync" 2014-02-28 18:02:22 +00:00
Calin Juravle
4ab29a3e4a Merge "Update tzcode to 2013i" 2014-02-28 17:40:09 +00:00
Calin Juravle
d892892e8e Fix locatime.c indentation after sync
Bug: 12246757
Change-Id: I8186e75f4899161af48cbf66e8f907dac0a326a2
2014-02-28 17:15:00 +00:00
Calin Juravle
bd33537fde Renamed the misleading libc/netbsd directory to libc/dns.
Bug: 13219633
Change-Id: Ide43add0b90b3081cc709a22d1ff1f59d65f1104
2014-02-28 16:31:04 +00:00
Elliott Hughes
e9db4a976f Merge "Vastly reduce the number of read(2)s done in tzload." 2014-02-28 16:23:40 +00:00
Calin Juravle
627d37cd1f Update tzcode to 2013i
Bug: 12246757
Change-Id: I3d5d2318155b1f54ef80afd58b1e5ca9a6d7018e
2014-02-28 14:38:14 +00:00
Elliott Hughes
fd3a9fb0c3 Vastly reduce the number of read(2)s done in tzload.
This costs us about 1000 fewer syscalls, which makes "adb shell strace date"
a lot more readable (which is the reason I've been meaning to fix this for a
long time now), but also actually saves a measurable amount of time.

Longer-term we should try to keep the tzdata mmap(2)ed in like libcore
does.

Change-Id: I1dd9c81968a13d3a6a55ba17f8a7d5c1f38cd103
2014-02-27 18:18:25 -08:00
Elliott Hughes
e334540516 Merge "Fix a leak on error in tzload." 2014-02-28 02:16:40 +00:00
Elliott Hughes
3073f90b17 Fix a leak on error in tzload.
Change-Id: Ib5d9aaa7a618e478ce8e5e82f967cf535bb1a5a3
2014-02-27 17:04:38 -08:00
Guillaume Ranquet
6ff0c75c83 Add recvmmsg and sendmmsg syscalls.
Also add the corresponding constant, struct, and function declarations
to <sys/socket.h>, and perfunctory tests so we know that the symbols
actually exist.

Signed-off-by: Guillaume Ranquet <guillaumex.ranquet@intel.com>
Change-Id: Ib0d854239d3716be90ad70973c579aff4895a4f7
2014-02-27 14:29:01 -08:00
Calin Juravle
ad2cfe2f23 Merge "Fix x86_64 build" 2014-02-27 21:31:13 +00:00
Pavel Chupin
7ba84d3108 Fix x86_64 build
Fix types after recent update:
https://android-review.googlesource.com/#/c/83435/

Change-Id: I17ed28af84b7adeb8572e18834e66f3264ec061d
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
2014-02-28 00:52:09 +04:00
Elliott Hughes
000ffd8ab0 Merge "Ensure that <fcntl.h> has the SYNC_FILE_RANGE_* constants." 2014-02-27 00:52:36 +00:00
Mark Salyzyn
3ba62f733b Merge "libc: Make calls to new user-space logger" 2014-02-27 00:28:48 +00:00
Elliott Hughes
3434727b3e Ensure that <fcntl.h> has the SYNC_FILE_RANGE_* constants.
Needed to build strace at their tip of tree.

Change-Id: I64db00a332088e08e25bc30357293a9308b8a226
2014-02-26 15:51:01 -08:00
Mark Salyzyn
0336e35368 libc: Make calls to new user-space logger
* libc (fatal) logging now makes socket connection to the
  user-space logging service.
* Add a TARGET_USES_LOGD make flag for BoardConfig.mk to manage
  whether logd is enabled for use or not.

Change-Id: I96ab598c76d6eec86f9d0bc81094c1fb3fb0d9b4
2014-02-26 15:33:13 -08:00
Calin Juravle
d4ee6b62d7 Merge "Fix mips build" 2014-02-26 21:34:57 +00:00
Calin Juravle
26349d8c2e Fix mips build
Change-Id: Ica843d387e115d0b27afd961af73237ec9109ed9
2014-02-26 21:33:36 +00:00
Calin Juravle
35036961f8 Merge "Moved to a more openbsd-like fenv.h" 2014-02-26 20:34:41 +00:00
Calin Juravle
2d367905a2 Moved to a more openbsd-like fenv.h
Factored out common declarations to include/fenv.h and pushed
the implementation to .c files.

Bug: 11050744
Change-Id: I446b13cc4bc599d328343a8d392b07de280f6304
2014-02-26 12:30:44 +00:00
Elliott Hughes
27c7dbeee6 Merge "Fix log_backtrace assertion failure caused by LP64 fix." 2014-02-25 23:36:43 +00:00
Elliott Hughes
ba76572789 Fix log_backtrace assertion failure caused by LP64 fix.
When libc.debug.malloc is enabled, stack backtraces fail with:

bionic/libc/bionic/libc_logging.cpp:378: assertion "conversion
    specifier unsupported" failed

The cause was a change to the format specifier from "%08x" to
"%0*x" to pass the field width as an additional parameter.
Unfortunately this modifier isn't supported by out_vformat() in
libc_logging.cpp.

Changed to use "%016x" if __LP64__ is defined; "%08x" otherwise.

Bug: 13177507
Change-Id: Ibf07263acf14da086d3c3788872f4b5477bd5708
2014-02-25 15:32:01 -08:00
Elliott Hughes
901553aaf4 Merge "Switch to current OpenBSD system.c." 2014-02-25 23:21:00 +00:00
Elliott Hughes
1e4378ea06 Switch to current OpenBSD system.c.
Change-Id: Ie2df60f0d55dca69149ffe064f10183411407987
2014-02-25 15:19:26 -08:00
Elliott Hughes
c380385f0b Merge "Fix LP64 builds after OpenBSD string changes." 2014-02-25 23:15:39 +00:00
Elliott Hughes
b6208836cb Fix LP64 builds after OpenBSD string changes.
Change-Id: I07202f6484e716d153d0387fcfc023e119438251
2014-02-25 15:12:29 -08:00
Elliott Hughes
5c7816f425 Merge "More OpenBSD cleanup (primarily string)." 2014-02-25 21:41:48 +00:00
Calin Juravle
a92b57c7f8 Merge "Added ftw64, nftw64" 2014-02-25 10:44:26 +00:00