musl/src/time
Rich Felker 4750cf4202 ditch the priority inheritance locks; use malloc's version of lock
i did some testing trying to switch malloc to use the new internal
lock with priority inheritance, and my malloc contention test got
20-100 times slower. if priority inheritance futexes are this slow,
it's simply too high a price to pay for avoiding priority inversion.
maybe we can consider them somewhere down the road once the kernel
folks get their act together on this (and perferably don't link it to
glibc's inefficient lock API)...

as such, i've switch __lock to use malloc's implementation of
lightweight locks, and updated all the users of the code to use an
array with a waiter count for their locks. this should give optimal
performance in the vast majority of cases, and it's simple.

malloc is still using its own internal copy of the lock code because
it seems to yield measurably better performance with -O3 when it's
inlined (20% or more difference in the contention stress test).
2012-04-24 16:32:23 -04:00
..
__asctime.c cleanup various minor issues reported by nsz 2011-09-26 00:59:28 -04:00
__time.h initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00
__time_to_tm.c initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00
__tm_to_time.c initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00
asctime.c initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00
asctime_r.c initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00
clock.c fix missing include in last commit 2011-08-13 08:42:15 -04:00
clock_getcpuclockid.c implement the remaining clock_* interfaces 2011-02-19 12:43:56 -05:00
clock_getres.c global cleanup to use the new syscall interface 2011-03-20 00:16:43 -04:00
clock_gettime.c use weak aliase rather than weak reference for vdso clock_gettime 2011-08-07 15:48:16 -04:00
clock_nanosleep.c overhaul pthread cancellation 2011-04-17 11:43:03 -04:00
clock_settime.c global cleanup to use the new syscall interface 2011-03-20 00:16:43 -04:00
ctime.c initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00
ctime_r.c initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00
difftime.c initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00
getdate.c remove debug cruft that was left in getdate 2012-03-02 00:24:49 -05:00
gettimeofday.c some preliminaries for vdso clock support 2011-07-23 23:45:33 -04:00
gmtime.c initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00
gmtime_r.c initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00
localtime.c initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00
localtime_r.c initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00
mktime.c initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00
nanosleep.c overhaul pthread cancellation 2011-04-17 11:43:03 -04:00
strftime.c initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00
strptime.c fix bugs in strptime handling of string day/month names, literals 2012-03-02 00:23:43 -05:00
time.c some preliminaries for vdso clock support 2011-07-23 23:45:33 -04:00
timer_create.c more efficient signal blocking for timer threads 2011-08-12 01:11:28 -04:00
timer_delete.c greatly improve SIGEV_THREAD timers 2011-04-09 02:23:33 -04:00
timer_getoverrun.c fix signal-based timers with null sigevent argument 2011-04-06 09:26:41 -04:00
timer_gettime.c fix signal-based timers with null sigevent argument 2011-04-06 09:26:41 -04:00
timer_settime.c fix signal-based timers with null sigevent argument 2011-04-06 09:26:41 -04:00
times.c global cleanup to use the new syscall interface 2011-03-20 00:16:43 -04:00
tzset.c ditch the priority inheritance locks; use malloc's version of lock 2012-04-24 16:32:23 -04:00
utime.c global cleanup to use the new syscall interface 2011-03-20 00:16:43 -04:00
wcsftime.c implement wcsftime function 2012-02-28 15:59:01 -05:00