Commit Graph

6 Commits

Author SHA1 Message Date
Dan Gohman
5d8a1409aa
Update to musl 1.2.3.
* Update to musl 1.2.3.

See the WHATSNEW file for details.
2022-05-24 19:31:23 -07:00
Dan Gohman
b9b64a695a Emulate clock, times, and getrusage using the monotonic clock.
Upcoming WASI snapshots omit the `PROCESS_CPUTIME` clock, since WASI has
no inherent concept of processes, and since implementations which don't
use a process for each instance don't have a way to implement it
efficiently.

However, `clock`, `times`, and `getrusage` are useful functions, so
provide optional emulated version of them, using the `MONOTONIC` clock.
This means these implementations will measure not just the program's
own CPU time, but also time spent suspended while other programs are
running.

Due to this difference in behavior, put these implementations behind
a flag. Users must pass `-D_WASI_EMULATED_PROCESS_CLOCK` and link with
`-lwasi-emulated-process-clocks` to enable them.
2021-03-23 10:34:46 -07:00
Dan Gohman
575e1579a4 Update to musl 1.2.0.
See the WHATSNEW file for details. The biggest change in musl is the
switch to 64-bit time_t for 32-bit targets, however WASI libc was already
using 64-bit time_t. The main change affecting WASI is an update to
Unicode 12.1.0.
2020-02-26 10:23:05 -08:00
Dan Gohman
24f6fe1cc8 Don't declare lockfile and timezone functions.
These aren't defined, so don't declare them either.
2019-05-15 12:01:17 -07:00
Dan Gohman
e5f14be383 Add comments explaining changes to upstream source files.
Add at least a one-line comment on every
`#ifdef __wasilibc_unmodified_upstream` briefly indicating what its
purpose is.

While here, reenable some of the code that was previously disabled when
getenv wasn't supported, as getenv is now supported.
2019-04-05 06:39:09 -07:00
Dan Gohman
320054e84f WASI libc prototype implementation.
This incoporates pieces from musl-libc, cloudlibc, cloudabi, libpreopen,
and dlmalloc, as well as a significant amount of new code.
2019-03-27 07:59:55 -07:00