1. 26 Jun, 2007 1 commit
  2. 18 May, 2007 1 commit
  3. 21 Nov, 2006 1 commit
  4. 17 Nov, 2006 1 commit
  5. 26 Oct, 2006 1 commit
  6. 19 Oct, 2006 1 commit
  7. 25 Aug, 2006 2 commits
  8. 21 Aug, 2006 1 commit
    • Simon Marlow's avatar
      fixes to PPC version of cas(), from David Kirkman <dkirkman@gmail.com> · 7adc29e8
      Simon Marlow authored
      From David's email:
      The problem is that the inline assembler code was placing the result
      of an operation in a register that is used as input later in the code.
      At the bottom of this message I've extracted a short short code
      fragment that you can run through gcc (on a powerpc machine) to see
      the generated assembly output.
      
      The changes to fix the problem are fairly simple.  The first adds an
      ampersand to the output list of the assembly fragment ("=r" (result)
      --> "=&r" (result)) The ampersand just tells gcc that result can not
      be placed in a register used for any of the input parameters (o, n, or
      p).  Otherwise, it feels free to place output parameters in the same
      registers used by the inputs -- but because of the flow of control
      here we need everything in a distinct register.  This change fixes the
      TVar program above.
      
      The second change adds a clobber list (the :"cc", "memory").  This
      tells gcc that the condition code (due to the compare) and memory (due
      to the store) might be changed during the asm execution.  The lack of
      a clobber list did not seem to be causing any trouble, but without it
      gcc is free to assume that no state is changed during the execution.
      7adc29e8
  9. 29 Jun, 2006 1 commit
  10. 16 Jun, 2006 1 commit
    • Simon Marlow's avatar
      Asynchronous exception support for SMP · b1953bbb
      Simon Marlow authored
      This patch makes throwTo work with -threaded, and also refactors large
      parts of the concurrency support in the RTS to clean things up.  We
      have some new files:
      
        RaiseAsync.{c,h}	asynchronous exception support
        Threads.{c,h}         general threading-related utils
      
      Some of the contents of these new files used to be in Schedule.c,
      which is smaller and cleaner as a result of the split.
      
      Asynchronous exception support in the presence of multiple running
      Haskell threads is rather tricky.  In fact, to my annoyance there are
      still one or two bugs to track down, but the majority of the tests run
      now.
      b1953bbb
  11. 07 Apr, 2006 1 commit
    • Simon Marlow's avatar
      Reorganisation of the source tree · 0065d5ab
      Simon Marlow authored
      Most of the other users of the fptools build system have migrated to
      Cabal, and with the move to darcs we can now flatten the source tree
      without losing history, so here goes.
      
      The main change is that the ghc/ subdir is gone, and most of what it
      contained is now at the top level.  The build system now makes no
      pretense at being multi-project, it is just the GHC build system.
      
      No doubt this will break many things, and there will be a period of
      instability while we fix the dependencies.  A straightforward build
      should work, but I haven't yet fixed binary/source distributions.
      Changes to the Building Guide will follow, too.
      0065d5ab
  12. 27 Mar, 2006 1 commit
  13. 06 Mar, 2006 1 commit
  14. 12 Feb, 2006 1 commit
  15. 09 Feb, 2006 1 commit
    • Simon Marlow's avatar
      Merge the smp and threaded RTS ways · eba7b660
      Simon Marlow authored
      Now, the threaded RTS also includes SMP support.  The -smp flag is a
      synonym for -threaded.  The performance implications of this are small
      to negligible, and it results in a code cleanup and reduces the number
      of combinations we have to test.
      eba7b660
  16. 25 Nov, 2005 1 commit
  17. 24 Nov, 2005 1 commit
    • simonmar's avatar
      [project @ 2005-11-24 14:21:33 by simonmar] · 9df32c34
      simonmar authored
      unlockClosure() requires a write barrier for the compiler - write
      barriers aren't required for the CPU, but gcc re-orders non-aliasing
      writes unless we use an explicit barrier.
      
      This only just showed up when we started compiling the RTS with -O2.
      9df32c34
  18. 27 May, 2005 1 commit
  19. 24 May, 2005 1 commit
  20. 10 May, 2005 1 commit
    • simonmar's avatar
      [project @ 2005-05-10 13:25:41 by simonmar] · bf821981
      simonmar authored
      Two SMP-related changes:
      
        - New storage manager interface:
      
          bdescr *allocateLocal(StgRegTable *reg, nat words)
      
          which allocates from the current thread's nursery (being careful
          not to clash with the heap pointer).  It can do this without
          taking any locks; the lock only has to be taken if a block needs
          to be allocated.  allocateLocal() is now used instead of allocate()
          in a few PrimOps.
      
          This removes locks from most Integer operations, cutting down
          the overhead for SMP a bit more.
      
          To make this work, we have to be able to grab the current thread's
          Capability out of thin air (i.e. when called from GMP), so the
          Capability subsystem needs to keep a hash from thread IDs to
          Capabilities.
      
        - Small MVar optimisation: instead of taking the global
          storage-manager lock, do our own locking of MVars with a bit of
          inline assembly (x86 only for now).
      bf821981
  21. 27 Mar, 2005 1 commit
    • panne's avatar
      [project @ 2005-03-27 13:41:13 by panne] · 03dc2dd3
      panne authored
      * Some preprocessors don't like the C99/C++ '//' comments after a
        directive, so use '/* */' instead. For consistency, a lot of '//' in
        the include files were converted, too.
      
      * UnDOSified libraries/base/cbits/runProcess.c.
      
      * My favourite sport: Killed $Id$s.
      03dc2dd3
  22. 28 Jan, 2005 1 commit
    • simonmar's avatar
      [project @ 2005-01-28 12:55:17 by simonmar] · 153b9cb9
      simonmar authored
      Rationalise the BUILD,HOST,TARGET defines.
      
      Recall that:
      
        - build is the platform we're building on
        - host is the platform we're running on
        - target is the platform we're generating code for
      
      The change is that now we take these definitions as applying from the
      point of view of the particular source code being built, rather than
      the point of view of the whole build tree.
      
      For example, in RTS and library code, we were previously testing the
      TARGET platform.  But under the new rule, the platform on which this
      code is going to run is the HOST platform.  TARGET only makes sense in
      the compiler sources.
      
      In practical terms, this means that the values of BUILD, HOST & TARGET
      may vary depending on which part of the build tree we are in.
      
      Actual changes:
      
       - new file: includes/ghcplatform.h contains platform defines for
         the RTS and library code.
      
       - new file: includes/ghcautoconf.h contains the autoconf settings
         only (HAVE_BLAH).  This is so that we can get hold of these
         settings independently of the platform defines when necessary
         (eg. in GHC).
      
       - ghcconfig.h now #includes both ghcplatform.h and ghcautoconf.h.
      
       - MachRegs.h, which is included into both the compiler and the RTS,
         now has to cope with the fact that it might need to test either
         _TARGET_ or _HOST_ depending on the context.
      
       - the compiler's Makefile now generates
           stage{1,2,3}/ghc_boot_platform.h
         which contains platform defines for the compiler.  These differ
         depending on the stage, of course: in stage2, the HOST is the
         TARGET of stage1.  This was wrong before.
      
       - The compiler doesn't get platform info from Config.hs any more.
         Previously it did (sometimes), but unless we want to generate
         a new Config.hs for each stage we can't do this.
      
       - GHC now helpfully defines *_{BUILD,HOST}_{OS,ARCH} automatically
         in CPP'd Haskell source.
      
       - ghcplatform.h defines *_TARGET_* for backwards compatibility
         (ghcplatform.h is included by ghcconfig.h, which is included by
         config.h, so code which still #includes config.h will get the TARGET
         settings as before).
      
       - The Users's Guide is updated to mention *_HOST_* rather than
         *_TARGET_*.
      
       - coding-style.html in the commentary now contains a section on
         platform defines.  There are further doc updates to come.
      
      Thanks to Wolfgang Thaller for pointing me in the right direction.
      153b9cb9
  23. 04 Feb, 2002 1 commit
  24. 09 Feb, 2001 1 commit
  25. 08 Feb, 2001 1 commit
  26. 02 Nov, 1999 1 commit
    • simonmar's avatar
      [project @ 1999-11-02 15:05:38 by simonmar] · f6692611
      simonmar authored
      This commit adds in the current state of our SMP support.  Notably,
      this allows the new way 's' to be built, providing support for running
      multiple Haskell threads simultaneously on top of any pthreads
      implementation, the idea being to take advantage of commodity SMP
      boxes.
      
      Don't expect to get much of a speedup yet; due to the excessive
      locking required to synchronise access to mutable heap objects, you'll
      see a slowdown in most cases, even on a UP machine.  The best I've
      seen is a 1.6-1.7 speedup on an example that did no locking (two
      optimised nfibs in parallel).
      
      	- new RTS -N flag specifies how many pthreads to start.
      
      	- new driver -smp flag, tells the driver to use way 's'.
      
      	- new compiler -fsmp option (not for user comsumption)
      	  tells the compiler not to generate direct jumps to
      	  thunk entry code.
      
      	- largely rewritten scheduler
      
      	- _ccall_GC is now done by handing back a "token" to the
      	  RTS before executing the ccall; it should now be possible
      	  to execute blocking ccalls in the current thread while
      	  allowing the RTS to continue running Haskell threads as
      	  normal.
      
      	- you can only call thread-safe C libraries from a way 's'
      	  build, of course.
      
      Pthread support is still incomplete, and weird things (including
      deadlocks) are likely to happen.
      f6692611