Rune - Syscall work, stabilization
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 1 Apr 2016 04:08:58 +0000 (21:08 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 1 Apr 2016 04:08:58 +0000 (21:08 -0700)
commit345b5ed261b8b38c82968c320021b5344f0f7156
tree1086ac09de3a20607e57306ab0ec90525bbc3237
parentff730100d7529a189a524cfce82e72cf76b29fec
Rune - Syscall work, stabilization

* Fix bug in threadSleep*() where ms == 0 was not doing an indefinite
  sleep.  Mainly for WCHAN sleeping.

* Fix bug in EmitRAS_SemanticEnter() where LVALUE scope was being ignored,
  causing the zeroing code to overflow the type.

* Fix bug in GenAllocReturnBase() where the data storage status was not
  being properly set, resulting in a lock count mismatch.

* Remove some debugging, convert other debugging from stdout to stderr.

* Add a bunch of fd-related system calls.  Also change ('fix') the default
  behavior for read() and write() to use non-blocking I/O, loop internally
  if necessary, and also handle EINTR restarts.

* Greatly simplify the Syscall structure.  We no longer use sc_RetType
  or sc_Args so get rid of them.

* Remove File.fgets(), add File.fgetln().  Also add File.fgetbuf()
  which is similar to fgetln() in avoiding copies, but operates on
  the whole buffer when possible instead of line-by-line.

* Fix fread(), fwrite(), and related stdio functions to work properly
  with non-blocking I/O and EINTR.
22 files changed:
classes/generate/gen_defines.c
classes/stdio/fgets.d
classes/stdio/fread.d
classes/sys/fd.d
ext_x11/main.c
libdthread/event.c
libdthread/thread.c
libgen/backend_ras.c
libgen/gen_emit.c
libgen/run_refstor.c
libgen/run_stmt.c
libgen/sys.c
libgen/syscalls.h
libruntime/defs.h
libruntime/main.c
libruntime/sys_fd.c
libruntime/sys_misc.c
libruntime/sys_thread.c
libruntime/syscalls.h
libsupport/coretype.h
tests/fd_append.d [new file with mode: 0755]
tests/fd_pipe.d [new file with mode: 0755]