1. 18 Feb, 2002 7 commits
    • sof's avatar
      [project @ 2002-02-18 17:27:24 by sof] · 80f067ce
      sof authored
      unused arg wibble
    • sof's avatar
      [project @ 2002-02-18 17:26:48 by sof] · d94938cc
      sof authored
      If necessary, define THREADED_RTS and DEBUG when gen'ing rts.conf
    • sof's avatar
      [project @ 2002-02-18 16:28:39 by sof] · 0ef63546
      sof authored
      Filter out _stub.c gubbins from C_SRCS
    • sof's avatar
      [project @ 2002-02-18 16:27:24 by sof] · 6682da21
      sof authored
      remove STUBOBJS as an (explicit) dependency to LIBRARY (+comment as to why)
    • sewardj's avatar
      [project @ 2002-02-18 15:51:28 by sewardj] · 4b294905
      sewardj authored
      Fix import wibble
    • sof's avatar
      [project @ 2002-02-18 13:26:12 by sof] · 6e2ea06c
      sof authored
      Be clear about the lock assumptions of GarbageCollect(); it
      is now required to hold sched_mutex.
      The real reason for adding this requirement is so that when
      prior to scheduling finalizers and doing thread resurrection,
      GarbageCollect() may set the lock status of sched_mutex to
      the state expected by scheduleFinalizers() and resurrectThreads()
      (i.e., unlocked).
      Note: this is only an issue with pthreads. In the Win32 threading
      model, it's a NOP for a thread to grab a mutex it already holds.
    • sewardj's avatar
      [project @ 2002-02-18 12:41:01 by sewardj] · 45ddebc0
      sewardj authored
      Make foreign export dynamic work in GHCi.  Main changes:
      * Allow literal labels to propagate through the bytecode generator
        and eventually be linked by the runtime linker.
      * Minor mods to driver plumbing so that GHCi produces the relevant
        *_stub.[ch] files, compiles them with gcc, and loads the resulting .o's
      * Dereference the stable pointer in the generated C stub, rather
        than passing it to a Haskell-world helper.  This seems simpler and
        removes the need to have a H-world helper, which in turn means the
        stub .o doesn't refer to any H-world entities.  This is important
        because our linker can't deal with mutual recursion between
        BCOs and loaded objects.
      Still ToDo:
      * Make it thread/GC safe.  (Sigbjorn?)
      * Get rid of the bits of code in DsForeign which generate the
        Haskell helper.  I had a go but it wasn't obvious how to do it,
        so have deferred.
  2. 17 Feb, 2002 9 commits
  3. 16 Feb, 2002 4 commits
  4. 15 Feb, 2002 19 commits
    • sof's avatar
      [project @ 2002-02-15 22:14:27 by sof] · 9d70000e
      sof authored
      Extra arg to suspendThread() and resumeThread(); controls whether an external call is concurrent or not
    • sof's avatar
      [project @ 2002-02-15 22:13:32 by sof] · d95869c5
      sof authored
      New call attribute on foreign imports, threadsafe.
      It indicates that a foreign import can(*) safely be called
      concurrently with the continued evaluation of other Haskell
      threads, i.e., when the foreign call is made by a Haskell
      thread, it won't hinder the progress of other threads.
      (*) - if the platform and RTS supports it, it _will be_
      invoked concurrently.
    • sof's avatar
      [project @ 2002-02-15 21:07:19 by sof] · d031626e
      sof authored
      comments only
    • sof's avatar
      [project @ 2002-02-15 21:06:29 by sof] · e3fc374f
      sof authored
      fix bug which caused 'safe' to be identical to 'unsafe' in an FFI decl.
    • sof's avatar
      [project @ 2002-02-15 20:58:14 by sof] · b7709803
      sof authored
      suspendThread() comment
    • sof's avatar
      [project @ 2002-02-15 17:49:23 by sof] · 21001dc3
      sof authored
      unbreak prev. commit
    • simonmar's avatar
      [project @ 2002-02-15 14:53:32 by simonmar] · adfe39e8
      simonmar authored
      Ensure that async exceptions are blocked during the raising of an
      async exception - we're about to block them anyway on entry to the
      handler, but we don't want any further exceptions being raised in the
    • simonmar's avatar
      [project @ 2002-02-15 14:49:08 by simonmar] · 93d2b952
      simonmar authored
      Fix bugs in async exception raising: instead of trying to build an
      application of the exception handler to the exception directly, just
      leave a THUNK(raise,exception) on top of the CATCH_FRAME ready to
      trigger the next time this thread is run.
      This avoids two problems: the PAP we were using before wasn't really a
      PAP, which broke some assumptions elsewhere (c.f. PAP_ENTRY:
      CATCH_FRAME failure), and there was also some duplication between
      raiseAsync and raisezh_fast due to the fact that we were attempting to
      do the raising directly.
    • sewardj's avatar
      [project @ 2002-02-15 12:29:46 by sewardj] · 5b50dc39
      sewardj authored
      For f-x-dynamic, x86, ccall: rename "a_" to "original_return_addr" so
      that the next luzer to look at this stuff doesn't have to spend hours
      figuring out what the hell "a_" is for.
    • simonmar's avatar
      [project @ 2002-02-15 09:46:15 by simonmar] · 92f336f6
      simonmar authored
      Fix typo
    • simonpj's avatar
      [project @ 2002-02-15 09:32:47 by simonpj] · b383edf2
      simonpj authored
      Comments only
    • simonpj's avatar
      [project @ 2002-02-15 09:32:18 by simonpj] · 87a229b8
      simonpj authored
      	Fix an interesting case-alternatives filtering bug
      This bug, shown up by Krasimir's ObjectIO suite, caused the
      simplifier to encounter a case expression like
      	case x of { x:xs -> True; [] -> False }
      in a context where x could not possibly be either a (:) or []!
      Case expressions in the enclosing scope dealt with it...
      So the alternative-filtering removed all the alternatives, leaving
      a case expression with no branches, which GHC didn't like one little
      The actual bug was elsewhere; it was because we should sometimes
      filter out the DEFAULT alternative, and we weren't doing that.
      To fix it, I pulled the alternative-filtering code out of Simplify
      and put it in SimplUtils.prepareAlts.  It's nice now.
    • sof's avatar
      [project @ 2002-02-15 08:11:42 by sof] · 98694bb7
      sof authored
      drop -mwin32 filtering
    • sof's avatar
      [project @ 2002-02-15 08:10:44 by sof] · 1b62ed65
      sof authored
      mingw: drop the use of -mwin32 in CC_OPTS; no longer needed
    • sof's avatar
      [project @ 2002-02-15 07:50:36 by sof] · 6d7576ef
      sof authored
      Tighten up the Scheduler synchronisation story some more:
      - moved thread_ready_cond + the counter rts_n_waiting_tasks
        to Capability.c, leaving only sched_mutex as a synchro
        variable in Scheduler (the less stuff that inhabit
        Schedule.c, the better, methinks.)
      - upon entry to the Scheduler, a worker thread will now call
        Capability.yieldToReturningWorker() to check whether it
        needs to give up its capability.
      - Worker threads that are either idle or lack a capability,
        will now call Capability.waitForWorkCapability() and block.
    • sof's avatar
      [project @ 2002-02-15 07:40:10 by sof] · 22da500c
      sof authored
      Use scheduleExtThread() (see 20020214 commit msg for SchedAPI.h for details)
    • sof's avatar
      [project @ 2002-02-15 07:38:45 by sof] · 9b7c000a
      sof authored
    • sof's avatar
      [project @ 2002-02-15 07:37:55 by sof] · 619cd23c
      sof authored
      Distinguish between the scheduling of a new thread from within
      the RTS (e.g., via forkIO, running finalizers etc) and scheduling
      of a thread that's created via the RtsAPI -- the latter
      now uses scheduleExtThread(), the rest scheduleThread().
      Why the distinction? Because the former will in threaded builds create
      a worker OS thread, while the latter won't. (There's an added
      wrinkle -- main() will also use scheduleThread()).
    • sof's avatar
      [project @ 2002-02-15 07:23:02 by sof] · c92c7487
      sof authored
      Add rts_mainEvalIO proto
  5. 14 Feb, 2002 1 commit