1. 20 Aug, 2004 1 commit
  2. 13 Aug, 2004 1 commit
  3. 18 Jun, 2004 1 commit
    • dons's avatar
      [project @ 2004-06-18 09:02:40 by dons] · 5218cb82
      dons authored
      Have loadObj ignore requests to load an object more than once, instead
      of actually loading the object, then dying.
      
      This change lets user-land loaders safely work inside GHCi, when they
      would have no way to know what packages had already been loaded.
      
      Help from SimonM and Andre Pang.
      5218cb82
  4. 16 Jun, 2004 1 commit
    • dons's avatar
      [project @ 2004-06-16 10:47:48 by dons] · abad5596
      dons authored
      Add linker symbols into linker symbol table.
      This lets things that bind to the linker run in GHCi.
      Tested on OSX and OpenBSD.
      
      Thanks to Andre Pang.
      abad5596
  5. 12 Jun, 2004 1 commit
  6. 15 May, 2004 1 commit
  7. 22 Mar, 2004 1 commit
  8. 15 Feb, 2004 1 commit
  9. 05 Jan, 2004 1 commit
    • simonmar's avatar
      [project @ 2004-01-05 17:32:35 by simonmar] · 9858bd46
      simonmar authored
      Instead of grabbing the handle to the executable by calling
      dlopen(NULL,...), use RTLD_DEFAULT as the handle to lookup symbols if
      it is available.  It seems that RTLD_DEFAULT may be required on
      certain systems, although I'm not sure it is available everywhere, so
      I've left the old code as fallback in case it isn't available.
      9858bd46
  10. 23 Dec, 2003 1 commit
  11. 18 Dec, 2003 1 commit
  12. 17 Dec, 2003 1 commit
  13. 12 Nov, 2003 1 commit
  14. 02 Nov, 2003 1 commit
  15. 29 Oct, 2003 1 commit
  16. 08 Oct, 2003 2 commits
    • wolfgang's avatar
      [project @ 2003-10-08 10:37:25 by wolfgang] · 79c93a8a
      wolfgang authored
      Remove apostrophe from #error directive text, as gcc doesn't like that,
      even if the #error is ifdef'd out.
      
      All other C compilers I know claim that this is correct C :-(.
      
      merge to stable
      79c93a8a
    • wolfgang's avatar
      [project @ 2003-10-08 09:42:34 by wolfgang] · 2203c0ce
      wolfgang authored
      Mac OS X/PowerPC:
      Learn to cope with out-of-range relative jumps.
      
      PowerPC relative branch instructions have a 24 bit displacement field.
      As PPC code is always 4-byte-aligned, this yields a +-32MB range.
      If a particular imported symbol is outside this range, we have to redirect
      the jump to a short piece of new code that just loads the 32bit absolute
      address and jumps there.
      2203c0ce
  17. 01 Oct, 2003 1 commit
    • wolfgang's avatar
      [project @ 2003-10-01 10:57:39 by wolfgang] · d3581a6a
      wolfgang authored
      New implementation & changed type signature of forkProcess
      
      forkProcess now has the following type:
      forkProcess :: IO () -> IO ProcessID
      
      forkProcessAll has been removed as it is unimplementable in the threaded RTS.
      
      forkProcess using the old type (IO (Maybe ProcessID)) was impossible to
      implement correctly in the non-threaded RTS and very hard to implement
      in the threaded RTS.
      The new type signature allows a clean and simple implementation.
      d3581a6a
  18. 26 Sep, 2003 2 commits
  19. 25 Sep, 2003 1 commit
  20. 24 Sep, 2003 1 commit
    • simonmar's avatar
      [project @ 2003-09-24 11:06:51 by simonmar] · 8f57c3c1
      simonmar authored
      Move forkOS_createThread into the RTS so its implementation can be
      dependent on RTS_SUPPORTS_THREADS, which means we can provide a stub
      implementation in the !RTS_SUPPORTS_THREADS case, and hence not depend
      on pthread_create, which requires -lpthread.  The upshot is that GHCi
      now works again when !RTS_SUPPORTS_THREADS.
      8f57c3c1
  21. 21 Sep, 2003 1 commit
    • wolfgang's avatar
      [project @ 2003-09-21 22:20:51 by wolfgang] · 85aa72b9
      wolfgang authored
      Bound Threads
      =============
      
      Introduce a way to use foreign libraries that rely on thread local state
      from multiple threads (mainly affects the threaded RTS).
      
      See the file threads.tex in CVS at haskell-report/ffi/threads.tex
      (not entirely finished yet) for a definition of this extension. A less formal
      description is also found in the documentation of Control.Concurrent.
      
      The changes mostly affect the THREADED_RTS (./configure --enable-threaded-rts),
      except for saving & restoring errno on a per-TSO basis, which is also necessary
      for the non-threaded RTS (a bugfix).
      
      Detailed list of changes
      ------------------------
      
      - errno is saved in the TSO object and restored when necessary:
      ghc/includes/TSO.h, ghc/rts/Interpreter.c, ghc/rts/Schedule.c
      
      - rts_mainLazyIO is no longer needed, main is no special case anymore
      ghc/includes/RtsAPI.h, ghc/rts/RtsAPI.c, ghc/rts/Main.c, ghc/rts/Weak.c
      
      - passCapability: a new function that releases the capability and "passes"
        it to a specific OS thread:
      ghc/rts/Capability.h ghc/rts/Capability.c
      
      - waitThread(), scheduleWaitThread() and schedule() get an optional
        Capability *initialCapability passed as an argument:
      ghc/includes/SchedAPI.h, ghc/rts/Schedule.c, ghc/rts/RtsAPI.c
      
      - Bound Thread scheduling (that's what this is all about):
      ghc/rts/Schedule.h, ghc/rts/Schedule.c
      
      - new Primop isCurrentThreadBound#:
      ghc/compiler/prelude/primops.txt.pp, ghc/includes/PrimOps.h, ghc/rts/PrimOps.hc,
      ghc/rts/Schedule.h, ghc/rts/Schedule.c
      
      - a simple function, rtsSupportsBoundThreads, that returns true if THREADED_RTS
        is defined:
      ghc/rts/Schedule.h, ghc/rts/Schedule.c
      
      - a new implementation of forkProcess (the old implementation stays in place
        for the non-threaded case). Partially broken; works for the standard
        fork-and-exec case, but not for much else. A proper forkProcess is
        really next to impossible to implement:
      ghc/rts/Schedule.c
      
      - Library support for bound threads:
          Control.Concurrent.
            rtsSupportsBoundThreads, isCurrentThreadBound, forkOS,
            runInBoundThread, runInUnboundThread
      libraries/base/Control/Concurrent.hs, libraries/base/Makefile,
      libraries/base/include/HsBase.h, libraries/base/cbits/forkOS.c (new file)
      85aa72b9
  22. 11 Sep, 2003 1 commit
    • wolfgang's avatar
      [project @ 2003-09-11 15:12:25 by wolfgang] · d8144db0
      wolfgang authored
      Mac OS X:
      
      Bypass the dlfcn compatibility layer in lookupSymbol, use Apple's
      NSModule functions directly instead. This protects us from differences
      between different implementations of the dlcompat library (regarding
      treatment of prefixed underscores).
      Note that the compatibility layer is still used in addDLL (it's needed by
      the POSIX library anyway).
      
      Also, add a little more sanity checking (checkProddableBlock) to the Mach-O
      linker itself.
      
      MERGE TO STABLE
      d8144db0
  23. 10 Sep, 2003 1 commit
    • simonmar's avatar
      [project @ 2003-09-10 14:45:24 by simonmar] · 868973ac
      simonmar authored
      Quick hack to work around the dynamic exception crashes in GHCi.  The
      problem is this: the Data.Typeable library (Data.Dymamic in previous
      versions of GHC) maintains an internal cache mapping type names to
      unique numbers, and this cache is used for fast comparisons on
      TypeReps.  In GHCi, there are actually two versions of the
      Data.Typeable library loaded: one linked to GHCi itself, and the other
      dynamically loaded, so there are two copies of the hash tables.
      
      The problem is that if we have a Dynamic value generated using one set
      of hash tables, it will erroneously appear to be of a different type
      when the other hash tables are used.
      
      The hack I've instigated is to use the central RTS genSym (which
      already exists) to generate the unique Ids, so that the two copies of
      the dynamic library will be using distinct Ids, and Dynamics from one
      will never be recognisable to the other.
      868973ac
  24. 29 Aug, 2003 1 commit
    • simonmar's avatar
      [project @ 2003-08-29 16:00:25 by simonmar] · 7dc97354
      simonmar authored
      Initial x86-64 (aka amd64) support.
      
      Unregisterised it works perfectly.  Registerised, I think it's almost
      there, except that I seem to be running into the known codegen bug in
      GCC with register variables (bug #7871 in the gcc bugzilla), which
      means registerised support is basically hosed until the GCC folks
      can get their act together.
      
      We get 8 more registers on amd64, but only 2 more callee-saves
      registers.  The calling convention seems to pass args in registers by
      default, using the previously-callee-saves %rsi and %rdi as two of the
      new arg registers.
      
      I think GHCi should work, since we already have 64-bit ELF support
      thanks to Mat Chapman's work on the IA64 port.  I haven't tried GHCi,
      though.
      
      The native code generator should be a breeze, because it's so similar
      to plain x86.
      7dc97354
  25. 18 Aug, 2003 1 commit
    • dons's avatar
      [project @ 2003-08-18 09:27:54 by dons] · 0e780367
      dons authored
      x86 OpenBSD moves into ELF land
      (and sparc, alpha, sparc64 were already there)
      
      Also, it needs sligtly different header files.
      
      And dlopen can only be called with the DL_LAZY argument on this
      system.
      0e780367
  26. 20 Jul, 2003 1 commit
  27. 26 Jun, 2003 2 commits
  28. 24 Jun, 2003 1 commit
  29. 09 Jun, 2003 1 commit
  30. 30 May, 2003 1 commit
  31. 29 Apr, 2003 1 commit
  32. 31 Mar, 2003 2 commits
    • simonmar's avatar
      [project @ 2003-03-31 14:02:32 by simonmar] · 9d431e08
      simonmar authored
      On 32-bit platforms, add a bunch of symbols from libgcc.a used to
      support 64-bit arithmetic.
      
      It looks like these symbols are defined in libc on some platforms but
      not others, but it shouldn't do any harm to include them in the list
      of symbols that the linker knows about even if they're also in libc.
      They were already included for some platforms (cygwin, mingw, and
      darwin), this commit just includes then whenever we're compiling with
      gcc on a 32-bit platform.
      9d431e08
    • simonmar's avatar
      [project @ 2003-03-31 12:35:21 by simonmar] · 1f927e8f
      simonmar authored
      Include NetBSD support
      
      Submitted by: Urban Boquist <boquist@crt.se>
      1f927e8f
  33. 25 Mar, 2003 1 commit
    • sof's avatar
      [project @ 2003-03-25 17:58:47 by sof] · 2548429c
      sof authored
      to ease replacement of the underlying allocator used by stgMallocBytes() and friends, provide (&use) RtsUtils.c:stgFree()
      2548429c
  34. 21 Feb, 2003 1 commit
    • sof's avatar
      [project @ 2003-02-21 05:34:12 by sof] · 5b4f5a6a
      sof authored
      Asynchronous / non-blocking I/O for Win32 platforms.
      
      This commit introduces a Concurrent Haskell friendly view of I/O on
      Win32 platforms. Through the use of a pool of worker Win32 threads, CH
      threads may issue asynchronous I/O requests without blocking the
      progress of other CH threads. The issuing CH thread is blocked until
      the request has been serviced though.
      
      GHC.Conc exports the primops that take care of issuing the
      asynchronous I/O requests, which the IO implementation now takes
      advantage of. By default, all Handles are non-blocking/asynchronous,
      but should performance become an issue, having a per-Handle flag for
      turning off non-blocking could easily be imagined&introduced.
      
      [Incidentally, this thread pool-based implementation could easily be
      extended to also allow Haskell code to delegate the execution of
      arbitrary pieces of (potentially blocking) external code to another OS
      thread. Given how relatively gnarly the locking story has turned out
      to be with the 'threaded' RTS, that may not be such a bad idea.]
      5b4f5a6a
  35. 10 Feb, 2003 2 commits
    • wolfgang's avatar
      [project @ 2003-02-10 23:35:03 by wolfgang] · 8115ed09
      wolfgang authored
      Mac OS X:
      add one more relocation type (PPC_RELOC_BR24)
      and add more C run-time library symbols to the symbol table
      (made more difficult by the fact that these symbols don't
      have an underscore prefix, while everything else on Mac OS X has)
      8115ed09
    • simonmar's avatar
      [project @ 2003-02-10 10:41:52 by simonmar] · 84370d93
      simonmar authored
      Add some missing symbols.
      
      Should fix several recent test breakages with GHCi.
      84370d93