Skip to content
Snippets Groups Projects
  1. Sep 16, 2017
    • Raymond Toy's avatar
      Fix up minor issues in implementation · 65ce358d
      Raymond Toy authored
       - process-alive-p should return T for continued processes
       - Simplify prog-status slightly by making the status code array start
         :signaled instead of nil.
       - Update prog_status with enum to specify the codes to make it
         clearer what they mean and to make it clearer that it matches the
         expectations in prog-status.
      65ce358d
  2. Sep 09, 2017
    • Raymond Toy's avatar
      Fix #41: Report proper process status · f05cb10a
      Raymond Toy authored
      The main problem is that we weren't calling wait3 with WCONTINUED so
      that we would be signaled when the process continues.  And we also
      need to check that result of wait call was WCONTINUED>
      
      Replace the wait3 routine with a C routine (prog_status) so we don't
      have to deal with the OS-specific flags.  This function basically
      returns what the lisp function wait3 did.
      
      Use this function in GET-PROCESSES-STATUS-CHANGES.
      
       - runprog.c:
         - Add prog_status
       - run-program.lisp:
         - Use prog_status instead of wait3
       - issues.lisp:
         - Add basic test
      f05cb10a
  3. Jan 29, 2017
  4. Dec 23, 2016
  5. Dec 08, 2016
    • Raymond Toy's avatar
      Fix typo · dc743457
      Raymond Toy authored
      "Cound" -> "Could"
      dc743457
    • Raymond Toy's avatar
      Fix #34: Handle newline character correctly · d959c164
      Raymond Toy authored
      The string containing #\Newline that is used to output the newline
      character worked on little-endian architectures because the low octet
      was first in memory.  However on a big-endian sparc, a NUL character
      was output instead since the high octet is first in memory.
      
      So, create a explicit unsigned-byte 8 array containing exactly 1 octet
      that represents a newline character code.
      
      Tests pass on both sparc and x86/linux.
      d959c164
  6. Dec 07, 2016
    • Raymond Toy's avatar
      Replace unix-times usage with getrusage · 29cb2f47
      Raymond Toy authored
      unix:unix-times was only used for #+(and sparc svr4).  The existing
      code already supported a different function when this condition was
      false, so use that, which uses getrusage instead.
      
      Don't need cross-x86-sparc-bootstrap.lisp anymore either.
      29cb2f47
  7. Dec 01, 2016
  8. Nov 29, 2016
    • Raymond Toy's avatar
      Fix #26: Use nanosleep to sleep · e5777ecb
      Raymond Toy authored
      lisp/os-common.c:
      o Implement os_sleep(double) to sleep for the given number of
        seconds.  Uses nanosleep on all platforms to sleep, taking care to
        sleep more if nanosleep was interrupted.
      
      code/lispinit.lisp:
      code/multi-proc.lisp:
      o Use the new os_sleep function to sleep for the requested amount of
        time.
      e5777ecb
  9. Nov 11, 2016
  10. Sep 28, 2016
  11. Sep 19, 2016
    • Raymond Toy's avatar
      Fix #29: Update processing of command line · d9090138
      Raymond Toy authored
      Several related changes here.
      
      o If :process-command-line is NIL, *command-line-strings* and
        *command-line-application-arguments* weren't getting updated.  They
        should get updated so that the resulting core can get updated
        command line options instead of using the values dumped with the
        core.  The command line switch demons are still not run, as before.
      o Add a :quiet option as if -quiet were given.
      d9090138
  12. Sep 08, 2016
    • Raymond Toy's avatar
      Fix #30: compilation of (describe 'foo) · 53fe0a4f
      Raymond Toy authored
      The debug-info-source isn't available until later in the fasl, so
      don't try to print where the source was compiled from.  This seems
      like a small oversight since the next bit of code does nothing if the
      debug-info-source isn't available.
      53fe0a4f
  13. Sep 04, 2016
    • Raymond Toy's avatar
      37c549c6
    • Raymond Toy's avatar
      Fix #27: PATHNAME-MATCH-P loops for logical pathnames · c07cad4b
      Raymond Toy authored
      When support for search-lists was added to PATHNAME-MATCH-P, support
      for logical pathnames was broken because PATHNAME-MATCH-P eventually
      calls TRANSLATE-LOGICAL-PATHNAME which calls PATHNAME-MATCH-P with
      logical pathnames.  This caused infinite recursion.
      
      So add back the original PATHNAME-MATCH-P, but rename to
      %PATHNAME-MATCH-P and use that in TRANSLATE-LOGICAL-PATHNAME and
      friends.
      
      Add test for this case too.
      c07cad4b
  14. Sep 03, 2016
    • Raymond Toy's avatar
      Add comment. · 6c86016d
      Raymond Toy authored
      6c86016d
    • Raymond Toy's avatar
      Fix #28: Recursive function definition in cross-compile · 2482e5f0
      Raymond Toy authored
      The recursive definition comes from %single-float and %double-float
      trying to coerce a double-double-float to a single or double.  Not
      sure the best place to fix this, but added a special case here for
      %single-float and %double-float to convert the double-double-float to
      a double that can then be coerced to the appropriate type.  (Could
      have added a deftransform for coerce to handle double-doubles, but
      doing it here makes it easier to follow the code.)
      
      Verified that x86->x86 and sparc->sparc cross-compiles no longer have
      the warning.  Also verified that sparc->sparc actually cross-compiles
      and loads successfully and that the result will compile itself
      successfully.
      2482e5f0
  15. Aug 21, 2016
    • Raymond Toy's avatar
      Fix #25: Handle unicode strings more consistently. · a8c27cfa
      Raymond Toy authored
      When writing a string to the program too few octets were written
      because strings are now 16-bits wide.  To fix this, only write the low
      8-bits of each character.  This matches what reading does.
      
      This pretty much implies that the caller should use
      STREAM:STRING-ENCODE and STREAM::STRING-DECODE on the strings.
      
      Add several tests to verify the expected results.
      a8c27cfa
  16. May 21, 2016
    • Raymond Toy's avatar
      Add :RELOCATABLE-STACKS to *features* · 7bab5262
      Raymond Toy authored
      Add this as a runtime feature so that it shows up in *features* and
      so that the C runtime has FEATURE_RELOCATABLE_STACKS defined.
      
      src/code/sparc-svr4-vm.lisp:
      src/code/x86-vm.lisp:
      o Make :relocatable-stacks a runtime feature.
      
      src/lisp/validate.h
      o Need to include internals.h here so constants are set up according
        to internals.h
      
      src/lisp/x86-validate-darwin.h:
      o Use FEATURE_RELOCATABLE_STACKS instead of RELOCATABLE_STACK_START.
      7bab5262
    • Raymond Toy's avatar
      Expand on some docstrings · 00ec87ed
      Raymond Toy authored
      Describe better the following:
      
      sys::*runtime-features*
      register-lisp-feature
      register-lisp-runtime-feature
      00ec87ed
  17. Mar 06, 2016
  18. Jan 18, 2016
  19. Jan 16, 2016
  20. Jan 14, 2016
  21. Jan 13, 2016
    • Raymond Toy's avatar
      Restore the FPU state before exiting. · d7850f57
      Raymond Toy authored
      Put an unwind-protect around the error calls.  The cleanup form
      restores the floating-point modes from the sigcontext so that the mode
      is restored.  This is needed, I think, because we throw so that the
      signal handler doesn't return so the sigcontext isn't restored.  If we
      don't restore the fpu state, it's set to the default processor state.
      We want the default state when calling error.
      
      In this way, things like (* 1d300 1d300) signals an overflow, and when
      we throw to top-level, the floating-point modes are restored to their
      original values they had before.
      d7850f57
  22. Jan 10, 2016
    • Raymond Toy's avatar
      In WITH-FLOAT-TRAPS-*, remove the unused junk modifying the state. · d9763e90
      Raymond Toy authored
      We just want to return the original modes, so remove all the old
      commented out stuff that was modifying the original modes to some
      strange state.  This makes a lot more sense to me if
      WITH-FLOAT-TRAPS-* actually restored the modes exactly as they were
      before running the body.
      d9763e90
    • Raymond Toy's avatar
      Handle FPU exceptions better. · da2ff74d
      Raymond Toy authored
      In sigfpe-handler, don't modify the modes; just use whatever they
      are. (They should be the default values.)
      
      In with-float-traps-*, actually just restore the floating-point mode
      to the exact original mode instead of trying to mask things out.
      da2ff74d
    • Raymond Toy's avatar
      Handle FP exceptions better. · e63bc1e9
      Raymond Toy authored
      Don't restore the fpu state from the context in the interrupt handler
      code (interrupt_handle_now) because that just makes the fpu state the
      same as the sigcontext that received the exception.  I think this was
      done to reset the x87 fpu precision to 53-bit so that lisp can
      continue with default double-float rounding.  This isn't needed
      anymore since lisp doesn't use x87 anymore.
      
      In SIGFPE-HANDLER, don't modify the current fp state based on the
      state from the sigcontext.
      
      These two items cause the arithmetic-error exception printer to
      trigger inexact when printing out the args.  We add a few debugging
      prints for now so we can see what the FP state is in the handler.
      Remove them later.
      e63bc1e9
  23. Jan 07, 2016
  24. Jan 01, 2016
  25. Dec 31, 2015
  26. Dec 30, 2015
    • Raymond Toy's avatar
      WITH-FLOAT-TRAPS-ENABLED was incorrectly setting accrued exceptions. · edb5af9b
      Raymond Toy authored
      Fix issue #14.
      
      WITH-FLOAT-TRAPS-ENABLED was leaving the accrued (and current)
      exceptions unchanged, but it should have cleared out any values there
      that matched the exceptions to be enabled.  Without this, the next x87
      operation would signal an exception if an accrued exception matched
      an enabled exception.  This was the cause of issue #14.  (Note that
      for x87, the accrued exception is the same as current exception.)
      edb5af9b
    • Raymond Toy's avatar
      Add %SET-FLOATING-POINT-MODES and %GET-FLOATING-POINT-MODES functions. · b4771d76
      Raymond Toy authored
      To aid in debugging floating point modes, add two new functions:
      
      o %SET-FLOATING-POINT-MODES is like SET-FLOATING-POINT-MODES but
        applies the result to a specified mode value, returning the new mode
        value (as an integer).  This is useful for investigating different
        mode values without modifying the actual hardware mode.
      o %GET-FLOATING-POINT-MODES is like GET-FLOATING-POINT-MODES but uses
        an integer argument instead of the actual floating-point mode.
        Useful when used with %SET-FLOATING-POINT-MODE or on its own.
      b4771d76
  27. Dec 28, 2015
    • Raymond Toy's avatar
      Clean up with-float-traps macro. · 90b9651b
      Raymond Toy authored
       * Add some comments.
       * Change x86 (setf floating-point-modes) to accept (unsigned-byte
         32).
       * Remove unneeded x86 conditionalization on the byte size.
      90b9651b
  28. Dec 27, 2015
  29. Dec 26, 2015
    • Raymond Toy's avatar
      Fix bug on sparc and clean up. · 38e8ce5c
      Raymond Toy authored
      On sparc and ppc (setf vm:floating-point-modes) takes an
      (unsigned-byte 32) arg, so adjust the ldb byte appopriately. 
      
      Clean up code by putting the docstring into the macro.
      38e8ce5c
Loading