ocaml/otherlibs/unix
Stephen Dolan a8e2f2b170
Unbox result of Unix.gettimeofday in unix and win32unix (#9561)
This patch makes Unix.time and Unix.gettimeofday be unboxed and @noalloc, which makes them about 20% faster (as measured by a stupid benchmark that does them many times in a loop).

This removes the fallback and error-handling paths from gettimeofday.  Neither is needed according to Single Unix Specification and POSIX.

Fixes: #7446
2020-06-02 11:05:57 +02:00
..
.depend Cease committing C dependendency information 2020-04-17 14:11:22 +01:00
Makefile Reimplement Unix.create_process in C, using posix_spawn if possible 2020-05-19 19:21:18 +02:00
accept.c Unix library: better API for "close-on-exec" over file descriptors (#650) 2017-02-13 18:05:19 +01:00
access.c Whitespace and overlong line fixes. 2018-06-14 15:15:34 +01:00
addrofstr.c unix: invalid_argument -> caml_invalid_argument 2016-11-26 16:47:22 -08:00
alarm.c Update headers for the new license. 2016-02-18 16:59:16 +01:00
bind.c unix: invalid_argument -> caml_invalid_argument 2016-11-26 16:47:22 -08:00
channels.c Merge the asmrun and byterun directories into the runtime directory 2018-06-28 17:50:33 +02:00
chdir.c Rename: use _os suffix 2017-09-27 11:55:53 +02:00
chmod.c Rename: use _os suffix 2017-09-27 11:55:53 +02:00
chown.c runtime: deprecation of caml_strdup, caml_strconcat 2017-03-17 20:50:16 +05:00
chroot.c runtime: deprecation of caml_strdup, caml_strconcat 2017-03-17 20:50:16 +05:00
close.c Update headers for the new license. 2016-02-18 16:59:16 +01:00
closedir.c Update headers for the new license. 2016-02-18 16:59:16 +01:00
connect.c unix: invalid_argument -> caml_invalid_argument 2016-11-26 16:47:22 -08:00
cst2constr.c Update headers for the new license. 2016-02-18 16:59:16 +01:00
cst2constr.h Update headers for the new license. 2016-02-18 16:59:16 +01:00
cstringv.c Whitespace and overlong line fixes. 2018-06-14 15:15:34 +01:00
dune Provide a way to build the bytecode compiler using Dune (#2093) 2018-10-10 16:16:00 +01:00
dup.c Unix library: better API for "close-on-exec" over file descriptors (#650) 2017-02-13 18:05:19 +01:00
dup2.c Unix library: better API for "close-on-exec" over file descriptors (#650) 2017-02-13 18:05:19 +01:00
envir.c Restrict Unix.environment in privileged contexts; add Unix.unsafe_environment (#1217) 2017-06-30 11:31:10 +02:00
errmsg.c Do not use the compatibility macros in the C stub code. (#892) 2016-11-17 11:03:09 +01:00
execv.c Rename: use _os suffix 2017-09-27 11:55:53 +02:00
execve.c Rename: use _os suffix 2017-09-27 11:55:53 +02:00
execvp.c Reimplement execvpe emulation in C 2020-05-19 19:20:26 +02:00
exit.c Update headers for the new license. 2016-02-18 16:59:16 +01:00
fchmod.c unix: invalid_argument -> caml_invalid_argument 2016-11-26 16:47:22 -08:00
fchown.c unix: invalid_argument -> caml_invalid_argument 2016-11-26 16:47:22 -08:00
fcntl.c Unix library: better API for "close-on-exec" over file descriptors (#650) 2017-02-13 18:05:19 +01:00
fork.c Rewrite the instrumented runtime to store traces in the CTF format. 2020-04-30 10:32:01 +02:00
fsync.c Fix Unix.fsync on Windows: retrieve fd outside blocking section 2018-07-31 23:25:20 +02:00
ftruncate.c unix: invalid_argument -> caml_invalid_argument 2016-11-26 16:47:22 -08:00
getaddrinfo.c Fix Unix.getaddrinfo when called on strings containing null bytes 2018-10-10 19:24:21 +02:00
getcwd.c Rename: use _os suffix 2017-09-27 11:55:53 +02:00
getegid.c Update headers for the new license. 2016-02-18 16:59:16 +01:00
geteuid.c Update headers for the new license. 2016-02-18 16:59:16 +01:00
getgid.c Update headers for the new license. 2016-02-18 16:59:16 +01:00
getgr.c Fix over-long lines with minor re-wordings 2018-06-13 09:37:49 +01:00
getgroups.c unix: invalid_argument -> caml_invalid_argument 2016-11-26 16:47:22 -08:00
gethost.c Do not use h_addr to access struct hostent 2019-12-22 17:43:33 +01:00
gethostname.c unix: invalid_argument -> caml_invalid_argument 2016-11-26 16:47:22 -08:00
getlogin.c Do not use the compatibility macros in the C stub code. (#892) 2016-11-17 11:03:09 +01:00
getnameinfo.c Whitespace and overlong line fixes. 2018-06-14 15:15:34 +01:00
getpeername.c unix: invalid_argument -> caml_invalid_argument 2016-11-26 16:47:22 -08:00
getpid.c Update headers for the new license. 2016-02-18 16:59:16 +01:00
getppid.c Update headers for the new license. 2016-02-18 16:59:16 +01:00
getproto.c unix: invalid_argument -> caml_invalid_argument 2016-11-26 16:47:22 -08:00
getpw.c getpw* and getgr* functions raise Unix_error when interrupted (#1451) 2017-12-15 11:46:39 +01:00
getserv.c unix: invalid_argument -> caml_invalid_argument 2016-11-26 16:47:22 -08:00
getsockname.c unix: invalid_argument -> caml_invalid_argument 2016-11-26 16:47:22 -08:00
gettimeofday.c Unbox result of Unix.gettimeofday in unix and win32unix (#9561) 2020-06-02 11:05:57 +02:00
getuid.c Update headers for the new license. 2016-02-18 16:59:16 +01:00
gmtime.c unix: invalid_argument -> caml_invalid_argument 2016-11-26 16:47:22 -08:00
initgroups.c unix: invalid_argument -> caml_invalid_argument 2016-11-26 16:47:22 -08:00
isatty.c Update headers for the new license. 2016-02-18 16:59:16 +01:00
itimer.c unix: invalid_argument -> caml_invalid_argument 2016-11-26 16:47:22 -08:00
kill.c Do not use the compatibility macros in the C stub code. (#892) 2016-11-17 11:03:09 +01:00
link.c Unix.link: include errno.h, correctly set feature test macro 2018-06-26 13:57:54 +02:00
listen.c unix: invalid_argument -> caml_invalid_argument 2016-11-26 16:47:22 -08:00
lockf.c unix: invalid_argument -> caml_invalid_argument 2016-11-26 16:47:22 -08:00
lseek.c Install all include files, and access internals with CAML_INTERNALS 2016-07-12 17:53:24 +02:00
mkdir.c runtime: deprecation of caml_strdup, caml_strconcat 2017-03-17 20:50:16 +05:00
mkfifo.c runtime: deprecation of caml_strdup, caml_strconcat 2017-03-17 20:50:16 +05:00
mmap.c Delete old compatibility from the bigarray stubs (#2315) 2019-03-13 11:51:02 +01:00
mmap_ba.c fix buggy assertion 2019-04-01 16:22:48 +02:00
nanosecond_stat.h Update headers for the new license. 2016-02-18 16:59:16 +01:00
nice.c Update headers for the new license. 2016-02-18 16:59:16 +01:00
open.c Update issue numbers in comments after Mantis -> Github migration. (#8505) 2019-03-18 09:42:23 +00:00
opendir.c runtime: deprecation of caml_strdup, caml_strconcat 2017-03-17 20:50:16 +05:00
pipe.c Unix library: better API for "close-on-exec" over file descriptors (#650) 2017-02-13 18:05:19 +01:00
putenv.c Rename: use _os suffix 2017-09-27 11:55:53 +02:00
read.c Do not use the compatibility macros in the C stub code. (#892) 2016-11-17 11:03:09 +01:00
readdir.c Do not use the compatibility macros in the C stub code. (#892) 2016-11-17 11:03:09 +01:00
readlink.c runtime: deprecation of caml_strdup, caml_strconcat 2017-03-17 20:50:16 +05:00
rename.c runtime: deprecation of caml_strdup, caml_strconcat 2017-03-17 20:50:16 +05:00
rewinddir.c unix: invalid_argument -> caml_invalid_argument 2016-11-26 16:47:22 -08:00
rmdir.c Rename: use _os suffix 2017-09-27 11:55:53 +02:00
select.c unix: invalid_argument -> caml_invalid_argument 2016-11-26 16:47:22 -08:00
sendrecv.c unix: invalid_argument -> caml_invalid_argument 2016-11-26 16:47:22 -08:00
setgid.c Update headers for the new license. 2016-02-18 16:59:16 +01:00
setgroups.c unix: invalid_argument -> caml_invalid_argument 2016-11-26 16:47:22 -08:00
setsid.c Remove use of compatibility macros in Cygwin-specific code. 2016-11-17 12:16:17 +01:00
setuid.c Update headers for the new license. 2016-02-18 16:59:16 +01:00
shutdown.c unix: invalid_argument -> caml_invalid_argument 2016-11-26 16:47:22 -08:00
signals.c Fix Thread.sigmask, take 2 (#2211) 2019-03-01 14:14:29 +01:00
sleep.c MPR#7903: make Thread.delay interruptible again (#2306) 2019-03-11 09:33:18 +01:00
socket.c Unix library: better API for "close-on-exec" over file descriptors (#650) 2017-02-13 18:05:19 +01:00
socketaddr.c alloc_sockaddr: handle abstract paths (v2) (#2248) 2019-02-21 15:37:25 +00:00
socketaddr.h Update headers for the new license. 2016-02-18 16:59:16 +01:00
socketpair.c Unix library: better API for "close-on-exec" over file descriptors (#650) 2017-02-13 18:05:19 +01:00
sockopt.c unix: invalid_argument -> caml_invalid_argument 2016-11-26 16:47:22 -08:00
spawn.c Reimplement Unix.create_process in C, using posix_spawn if possible 2020-05-19 19:21:18 +02:00
stat.c Protect against bad rounding of mtime / atime / ctime stats (#9505) 2020-05-13 18:43:46 +02:00
strofaddr.c unix: invalid_argument -> caml_invalid_argument 2016-11-26 16:47:22 -08:00
symlink.c runtime: deprecation of caml_strdup, caml_strconcat 2017-03-17 20:50:16 +05:00
termios.c unix: invalid_argument -> caml_invalid_argument 2016-11-26 16:47:22 -08:00
time.c Unbox result of Unix.gettimeofday in unix and win32unix (#9561) 2020-06-02 11:05:57 +02:00
times.c Cleaning up the C code (#1812) 2018-06-07 12:55:09 +02:00
truncate.c runtime: deprecation of caml_strdup, caml_strconcat 2017-03-17 20:50:16 +05:00
umask.c Update headers for the new license. 2016-02-18 16:59:16 +01:00
unix.ml Unbox result of Unix.gettimeofday in unix and win32unix (#9561) 2020-06-02 11:05:57 +02:00
unix.mli Add Unix.is_inet6_addr (#9575) 2020-05-18 09:32:00 +02:00
unixLabels.ml Update headers for the new license. 2016-02-18 16:59:16 +01:00
unixLabels.mli fix msg_flag type doc comment 2020-03-19 22:15:52 +01:00
unixsupport.c Make caml_named_value return a const value*. 2019-03-12 12:07:04 +00:00
unixsupport.h Unicode support for the Windows runtime (#1200) 2017-09-18 17:41:29 +02:00
unlink.c Rename: use _os suffix 2017-09-27 11:55:53 +02:00
utimes.c Unix.utimes: use native Windows API to avoid unintended DST timestamp shift 2017-10-26 12:05:47 +02:00
wait.c Set default status in Unix.waitpid when pid = 0. (#2225) 2019-03-01 15:54:43 +01:00
write.c Do not use the compatibility macros in the C stub code. (#892) 2016-11-17 11:03:09 +01:00