mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-04 18:28:30 +00:00
Fix more things
- Update a couple unicode data files - Disable strace during logger calls - SQLite now uses pread() / pwrite() - pread() past EOF on NT now returns 0 - Make the NT mmap() and fork() code elegant - Give NT a big performance boost with memory - Add many more mmap() tests to prove it works
This commit is contained in:
parent
b90fa996b4
commit
98909b1391
36 changed files with 1034 additions and 318 deletions
|
@ -16,6 +16,7 @@
|
|||
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR │
|
||||
│ PERFORMANCE OF THIS SOFTWARE. │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/calls/strace.internal.h"
|
||||
#include "libc/calls/struct/timespec.h"
|
||||
#include "libc/time/time.h"
|
||||
|
||||
|
@ -23,7 +24,10 @@
|
|||
* Sleeps for particular amount of microseconds.
|
||||
*/
|
||||
int usleep(uint32_t microseconds) {
|
||||
return nanosleep(
|
||||
&(struct timespec){microseconds / 1000000, microseconds % 1000000 * 1000},
|
||||
NULL);
|
||||
int rc;
|
||||
rc = nanosleep(&(struct timespec){(uint64_t)microseconds / 1000000,
|
||||
(uint64_t)microseconds % 1000000 * 1000},
|
||||
NULL);
|
||||
STRACE("usleep(%'u) → %d% m", microseconds, rc);
|
||||
return rc;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue