summaryrefslogtreecommitdiff
path: root/ghc/rts/Main.c
Commit message (Collapse)AuthorAgeFilesLines
* Reorganisation of the source treeSimon Marlow2006-04-071-138/+0
| | | | | | | | | | | | | | | 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.
* [project @ 2006-01-09 14:35:53 by simonmar]simonmar2006-01-091-1/+1
| | | | Avoid "dereferencing type-punned pointer will break strict-aliasing rules" warning
* [project @ 2005-10-21 14:02:17 by simonmar]simonmar2005-10-211-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Big re-hash of the threaded/SMP runtime This is a significant reworking of the threaded and SMP parts of the runtime. There are two overall goals here: - To push down the scheduler lock, reducing contention and allowing more parts of the system to run without locks. In particular, the scheduler does not require a lock any more in the common case. - To improve affinity, so that running Haskell threads stick to the same OS threads as much as possible. At this point we have the basic structure working, but there are some pieces missing. I believe it's reasonably stable - the important parts of the testsuite pass in all the (normal,threaded,SMP) ways. In more detail: - Each capability now has a run queue, instead of one global run queue. The Capability and Task APIs have been completely rewritten; see Capability.h and Task.h for the details. - Each capability has its own pool of worker Tasks. Hence, Haskell threads on a Capability's run queue will run on the same worker Task(s). As long as the OS is doing something reasonable, this should mean they usually stick to the same CPU. Another way to look at this is that we're assuming each Capability is associated with a fixed CPU. - What used to be StgMainThread is now part of the Task structure. Every OS thread in the runtime has an associated Task, and it can ask for its current Task at any time with myTask(). - removed RTS_SUPPORTS_THREADS symbol, use THREADED_RTS instead (it is now defined for SMP too). - The RtsAPI has had to change; we must explicitly pass a Capability around now. The previous interface assumed some global state. SchedAPI has also changed a lot. - The OSThreads API now supports thread-local storage, used to implement myTask(), although it could be done more efficiently using gcc's __thread extension when available. - I've moved some POSIX-specific stuff into the posix subdirectory, moving in the direction of separating out platform-specific implementations. - lots of lock-debugging and assertions in the runtime. In particular, when DEBUG is on, we catch multiple ACQUIRE_LOCK()s, and there is also an ASSERT_LOCK_HELD() call. What's missing so far: - I have almost certainly broken the Win32 build, will fix soon. - any kind of thread migration or load balancing. This is high up the agenda, though. - various performance tweaks to do - throwTo and forkProcess still do not work in SMP mode
* [project @ 2005-05-15 03:20:29 by wolfgang]wolfgang2005-05-151-5/+0
| | | | | Reinstate __stginit_Foo functions even when they don't do anything, because they are part of the documented interface (as discussed on cvs-ghc, Apr 26).
* [project @ 2005-04-22 16:01:53 by sof]sof2005-04-221-1/+2
| | | | | | Until the GHCi linker is made capable of handling .ctors sections in PEi object files, stick with __stginits. Being a bit sloppy by using 'mingw32_HOST_OS' to test for this.
* [project @ 2005-04-15 05:29:48 by wolfgang]wolfgang2005-04-151-0/+4
| | | | | | Initialise foreign exports from GNU C __attribute__((constructor)) functions in the stub C file, rather than from __stginit_ functions. For non-profiling ways, leave out __stginit_ alltogether.
* [project @ 2005-04-06 15:27:06 by simonmar]simonmar2005-04-061-0/+6
| | | | | | Revamp the Task API: now we use the same implementation for threaded and SMP. We also keep per-task timing stats in the threaded RTS now, which makes the output of +RTS -sstderr more useful.
* [project @ 2004-09-12 11:27:10 by panne]panne2004-09-121-1/+0
| | | | | Removed the annoying "Id" CVS keywords, they're a real PITA when it comes to merging...
* [project @ 2004-09-03 15:28:18 by simonmar]simonmar2004-09-031-6/+6
| | | | | | | | | | | | Cleanup: all (well, most) messages from the RTS now go through the functions in RtsUtils: barf(), debugBelch() and errorBelch(). The latter two were previously called belch() and prog_belch() respectively. See the comments for the right usage of these message functions. One reason for doing this is so that we can avoid spurious uses of stdout/stderr by Haskell apps on platforms where we shouldn't be using them (eg. non-console apps on Windows).
* [project @ 2004-08-13 13:04:50 by simonmar]simonmar2004-08-131-5/+1
| | | | Merge backend-hacking-branch onto HEAD. Yay!
* [project @ 2003-09-21 22:20:51 by wolfgang]wolfgang2003-09-211-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* [project @ 2003-07-10 08:02:29 by simonpj]simonpj2003-07-101-3/+3
| | | | Part of the fix to External-Core (:Main, not $Main), which got left out
* [project @ 2003-06-23 10:35:15 by simonpj]simonpj2003-06-231-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------- Dealing with 'main' ------------------- 1. In GHC 6.0, a module with no "module Main ... where" header elicited an error "main is not in scope" if 'main' is not defined. We don't want this behaviour in GHCi. This happened because the parser expanded the (absent) header to "module Main( main ) where", and the 'main' in the export list isn't. Solution: elaborate HsModule to record whether the 'module ..." header was given explicitly by the user or not. 2. Add a -main-is flag, and document it, so that you can have a 'main' function that is not Main.main. Summary of changes * The -main-is flag nominates what the main function is to be (see the documentation). No -main-is flag says that the main function is Main.main -main-is Foo.baz says that the main function is Foo.baz -main-is Foo says that the main function is Foo.main -main-is baz says that the main function is Main.baz Let's say you say -main-is Foo.baz * TcRnDriver injects the extra definition $Mian.main :: IO t $Main.main = baz in the module Foo. Note the naming, which is a bit different than before; previously the extra defn was for Main.$main. The RTS invokes zdMain_main_closure. * CodeGen injects an extra initialisation block into module Foo, thus stginit_zdMain { stginit_Foo } That ensures that the RTS can initialise stginit_zdMain.
* [project @ 2003-03-25 18:00:19 by sof]sof2003-03-251-1/+2
| | | | bring rts_mainLazyIO() into scope
* [project @ 2003-03-17 14:47:47 by simonmar]simonmar2003-03-171-4/+4
| | | | | | | | | | | Haskell quiz: what should this program do? main = return undefined answer: run to completion and exit successfully. GHC erroneously evaluates the returned value from main, which causes this example to fail with an uncaught exception (the evaluation is even done outside of the main exception handler!).
* [project @ 2002-07-18 06:05:29 by sof]sof2002-07-181-1/+2
| | | | more include tweaking
* [project @ 2002-02-13 08:48:06 by sof]sof2002-02-131-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revised implementation of multi-threaded callouts (and callins): - unified synchronisation story for threaded and SMP builds, following up on SimonM's suggestion. The following synchro variables are now used inside the Scheduler: + thread_ready_cond - condition variable that is signalled when a H. thread has become runnable (via the THREAD_RUNNABLE() macro) and there are available capabilities. Waited on: + upon schedule() entry (iff no caps. available). + when a thread inside of the Scheduler spots that there are no runnable threads to service, but one or more external call is in progress. + in resumeThread(), waiting for a capability to become available. Prior to waiting on thread_ready_cond, a counter rts_n_waiting_tasks is incremented, so that we can keep track of the number of readily available worker threads (need this in order to make an informed decision on whether or not to create a new thread when an external call is made). + returning_worker_cond - condition variable that is waited on by an OS thread that has finished executing and external call & now want to feed its result back to the H thread that made the call. Before doing so, the counter rts_n_returning_workers is incremented. Upon entry to the Scheduler, this counter is checked for & if it is non-zero, the thread gives up its capability and signals returning_worker_cond before trying to re-grab a capability. (releaseCapability() takes care of this). + sched_mutex - protect Scheduler data structures. + gc_pending_cond - SMP-only condition variable for signalling completion of GCs. - initial implementation of call-ins, i.e., multiple OS threads may concurrently call into the RTS without interfering with each other. Implementation uses cheesy locking protocol to ensure that only one OS thread at a time can construct a function application -- stop-gap measure until the RtsAPI is revised (as discussed last month) *and* a designated block is used for allocating these applications. - In the implementation of call-ins, the OS thread blocks waiting for an RTS worker thread to complete the evaluation of the function application. Since main() also uses the RtsAPI, provide a separate entry point for it (rts_mainEvalIO()), which avoids creating a separate thread to evaluate Main.main, that can be done by the thread exec'ing main() directly. [Maybe there's a tidier way of doing this, a bit ugly the way it is now..] There are a couple of dark corners that needs to be looked at, such as conditions for shutting down (and how) + consider what ought to happen when async I/O is thrown into the mix (I know what will happen, but that's maybe not what we want). Other than that, things are in a generally happy state & I hope to declare myself done before the week is up.
* [project @ 2002-02-05 15:42:04 by simonpj]simonpj2002-02-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --------- Main.main --------- A bunch of related fixes concerning 'main' * Arrange that 'main' doesn't need to be defined in module Main; it can be imported. * The typechecker now injects a binding Main.$main = PrelTopHandler.runMain main So the runtime system now calls Main.$main, not PrelMain.main. With z-encoding, this look like Main_zdmain_closure * The function PrelTopHandler.runMain :: IO a -> IO () wraps the programmer's 'main' in an exception-cacthing wrapper. * PrelMain.hs and Main.hi-boot are both removed from lib/std, along with multiple lines of special case handling in lib/std/Makefile. This is a worthwhile cleanup. * Since we now pick up whatever 'main' is in scope, the ranamer gets in on the act (RnRnv.checkMain). There is a little more info to get from the renamer to the typechecker, so I've defined a new type Rename.RnResult (c.f. TcModule.TcResult) * With GHCi, it's now a warning, not an error, to omit the binding of main (RnEnv.checkMain) * It would be easy to add a flag "-main-is foo"; the place to use that information is in RnEnv.checkMain. ------- On the way I made a new type, type HscTypes.FixityEnv = NameEnv Fixity and used it in various places I'd tripped over
* [project @ 2002-01-22 13:54:22 by simonmar]simonmar2002-01-221-5/+1
| | | | | | | | | | | | | | | | | | Deadlock is now an exception instead of a return status from rts_evalIO(). The current behaviour is as follows, and can be changed if necessary: in the event of a deadlock, the top main thread is taken from the main thread queue, and if it is blocked on an MVar or an Exception (for throwTo), then it receives a Deadlock exception. If it is blocked on a BLACKHOLE, we instead send it the NonTermination exception. Note that only the main thread gets the exception: it is the responsibility of the main thread to unblock other threads if necessary. There's a slight difference in the SMP build: *all* the main threads get an exception, because clearly none of them may make progress (compared to the non-SMP situation, where all but the top main thread are usually blocked).
* [project @ 2001-09-04 18:29:20 by ken]ken2001-09-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | THIS CHANGE AFFECTS ALL OBJECT FILES COMPILED FROM HASKELL. Please say "make -C ghc/lib/std clean; make -C hslibs clean". This commit eliminates spurious warning messages when compiling on the Alpha. There are two kinds of spurious warning messages: (1) gcc: -noprefix_recognition: linker input file unused since linking not done This warning is because we pass the flag "-Xlinker -noprefix_recognition" to gcc. We remove this warning by no longer passing the flag to gcc, and by removing the reason we were passing the flag in the first place: __init_* is now renamed to __stginit_*. (2) .../includes/Regs.h: warning: call-clobbered register used for global register variable This warning and all other warnings except (1), we eliminate by passing the -w flag to gcc. MERGE TO STABLE BRANCH
* [project @ 2001-08-14 13:40:07 by sewardj]sewardj2001-08-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the story about POSIX headers in C compilation. Until now, all C code in the RTS and library cbits has by default been compiled with settings for POSIXness enabled, that is: #define _POSIX_SOURCE 1 #define _POSIX_C_SOURCE 199309L #define _ISOC9X_SOURCE If you wanted to negate this, you'd have to define NON_POSIX_SOURCE before including headers. This scheme has some bad effects: * It means that ccall-unfoldings exported via interfaces from a module compiled with -DNON_POSIX_SOURCE may not compile when imported into a module which does not -DNON_POSIX_SOURCE. * It overlaps with the feature tests we do with autoconf. * It seems to have caused borkage in the Solaris builds for some considerable period of time. The New Way is: * The default changes to not-being-in-Posix mode. * If you want to force a C file into Posix mode, #include as the **first** include the new file ghc/includes/PosixSource.h. Most of the RTS C sources have this include now. * NON_POSIX_SOURCE is almost totally expunged. Unfortunately we have to retain some vestiges of it in ghc/compiler so that modules compiled via C on Solaris using older compilers don't break.
* [project @ 2001-08-07 20:10:30 by ken]ken2001-08-071-16/+1
| | | | | Back up previous change, which was not really a fix of any bug, let alone the bug it seemed to have fixed.
* [project @ 2001-07-26 03:20:52 by ken]ken2001-07-261-1/+16
| | | | | | | | | | | | | | | Added to main(): /* * Believe it or not, calling tzset() at startup seems to get rid of * a scheduler-related Heisenbug on alpha-dec-osf3. The symptom of * the bug is that, when the load on the machine is high or when * there are many threads, the variable "Capability *cap" in the * function "schedule" in the file "Schedule.c" magically becomes * null before the line "t = cap->rCurrentTSO;". Why, and why does * calling tzset() here seem to fix it? Excellent questions! */ tzset();
* [project @ 2001-03-22 03:51:08 by hwloidl]hwloidl2001-03-221-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -*- outline -*- Time-stamp: <Thu Mar 22 2001 03:50:16 Stardate: [-30]6365.79 hwloidl> This commit covers changes in GHC to get GUM (way=mp) and GUM/GdH (way=md) working. It is a merge of my working version of GUM, based on GHC 4.06, with GHC 4.11. Almost all changes are in the RTS (see below). GUM is reasonably stable, we used the 4.06 version in large-ish programs for recent papers. Couple of things I want to change, but nothing urgent. GUM/GdH has just been merged and needs more testing. Hope to do that in the next weeks. It works in our working build but needs tweaking to run. GranSim doesn't work yet (*sigh*). Most of the code should be in, but needs more debugging. ToDo: I still want to make the following minor modifications before the release - Better wrapper skript for parallel execution [ghc/compiler/main] - Update parallel docu: started on it but it's minimal [ghc/docs/users_guide] - Clean up [nofib/parallel]: it's a real mess right now (*sigh*) - Update visualisation tools (minor things only IIRC) [ghc/utils/parallel] - Add a Klingon-English glossary * RTS: Almost all changes are restricted to ghc/rts/parallel and should not interfere with the rest. I only comment on changes outside the parallel dir: - Several changes in Schedule.c (scheduling loop; createThreads etc); should only affect parallel code - Added ghc/rts/hooks/ShutdownEachPEHook.c - ghc/rts/Linker.[ch]: GUM doesn't know about Stable Names (ifdefs)!! - StgMiscClosures.h: END_TSO_QUEUE etc now defined here (from StgMiscClosures.hc) END_ECAF_LIST was missing a leading stg_ - SchedAPI.h: taskStart now defined in here; it's only a wrapper around scheduleThread now, but might use some init, shutdown later - RtsAPI.h: I have nuked the def of rts_evalNothing * Compiler: - ghc/compiler/main/DriverState.hs added PVM-ish flags to the parallel way added new ways for parallel ticky profiling and distributed exec - ghc/compiler/main/DriverPipeline.hs added a fct run_phase_MoveBinary which is called with way=mp after linking; it moves the bin file into a PVM dir and produces a wrapper script for parallel execution maybe cleaner to add a MoveBinary phase in DriverPhases.hs but this way it's less intrusive and MoveBinary makes probably only sense for mp anyway * Nofib: - nofib/spectral/Makefile, nofib/real/Makefile, ghc/tests/programs/Makefile: modified to skip some tests if HWL_NOFIB_HACK is set; only tmp to record which test prgs cause problems in my working build right now
* [project @ 2001-02-09 12:40:22 by simonmar]simonmar2001-02-091-2/+2
| | | | declare __init_PrelMain to match the new prototype for startupHaskell.
* [project @ 2000-06-25 17:25:42 by panne]panne2000-06-251-1/+2
| | | | Keep gcc -Wall happy
* [project @ 2000-04-26 09:28:18 by simonmar]simonmar2000-04-261-2/+2
| | | | note that a return status of Killed means "uncaught exception".
* [project @ 2000-04-11 16:49:20 by sewardj]sewardj2000-04-111-2/+2
| | | | | Fix bitrot to allow (standalone) StgHugs to be built on Solaris, so we can Purify it.
* [project @ 2000-04-03 16:26:01 by simonmar]simonmar2000-04-031-2/+2
| | | | eliminate warning
* [project @ 2000-04-03 13:44:47 by simonmar]simonmar2000-04-031-3/+3
| | | | call __init_PrelMain instead of __init_Main.
* [project @ 2000-03-31 03:09:35 by hwloidl]hwloidl2000-03-311-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Numerous changes in the RTS to get GUM-4.06 working (currently works with parfib-ish programs). Most changes are isolated in the rts/parallel dir. rts/parallel/: The most important changes are a rewrite of the (un-)packing code (Pack.c) and changes in LAGA, GALA table operations (Global.c) expecially in rebuilding the tables during GC. rts/: Minor changes in Schedule.c, GC.c (interface to par specific root marking and evacuation), and lots of additions to Sanity.c (surprise ;-) Main.c change for startup: I use a new function rts_evalNothing to start non-main-PEs in a PAR || SMP setup (RtsAPI.c) includes/: Updated GranSim macros in PrimOps.h. lib/std: Few changes in PrelHandle.c etc replacing ForeignObj by Addr in a PAR setup (we still don't support ForeignObjs or WeakPtrs in GUM). Typically use #define FILE_OBJECT Addr when dealing with files. hslibs/lang/: Same as above (in Foreign(Obj).lhs, Weak.lhs, IOExts.lhs etc). -- HWL
* [project @ 2000-03-30 12:03:30 by simonmar]simonmar2000-03-301-2/+3
| | | | | | | | | | | | | | | | | HEADS UP!!! change the type of startupHaskell(): void startupHaskell ( int argc, char *argv[], void *init_root ); the extra parameter is a pointer to the initialisation function for the root module in the program. eg., Main.c now passes __init_Main for this parameter. It can be left as NULL if there is no root module. This interface may need to be revised, since in some circumstances there may be more than one "root module". Sigbjorn: H/Direct will need some changes to stay in sync here.
* [project @ 2000-03-14 09:55:05 by simonmar]simonmar2000-03-141-5/+5
| | | | | | | | | | | | | | | | | | Handle references from the RTS to the Prelude in a more consistent way. - For statically-linked binaries, nothing has changed. - For the interpreter, refs from the RTS to the Prelude are now indirected. The indirections need to be filled in at some point during startup by calling fixupPreludeRefs (in Prelude.c). - The CHARLIKE and INTLIKE tables are now handled in the same way for both Hugs and DLLs. Hugs will be broken for a short while until Julian sorts out the Hugs parts of this change.
* [project @ 2000-03-13 10:53:55 by simonmar]simonmar2000-03-131-1/+2
| | | | | | | | Move Prelude.h from ghc/includes into ghc/rts. It's essentially a list of the things from the Prelude that the RTS depends on, and isn't relevant to STG code. Furthermore, this helps to clarify which parts of the RTS depend on things from the Prelude (by an explicity #include).
* [project @ 2000-01-14 13:38:54 by simonmar]simonmar2000-01-141-3/+3
| | | | eliminate warning.
* [project @ 2000-01-14 13:17:15 by hwloidl]hwloidl2000-01-141-2/+2
| | | | Minor cleanup to get rid of warnings.
* [project @ 2000-01-13 14:33:57 by hwloidl]hwloidl2000-01-131-17/+62
| | | | | Merged GUM-4-04 branch into the main trunk. In particular merged GUM and SMP code. Most of the GranSim code in GUM-4-04 still has to be carried over.
* [project @ 2000-01-13 12:40:15 by simonmar]simonmar2000-01-131-9/+18
| | | | | | | | | | | | | | | | | | | - remove AllBlocked scheduler return code. Nobody owned up to having created it or even knowing what it was there for. - clean up fatal error condition handling somewhat. The process exit code from a GHC program now indicates the kind of failure for certain kinds of exit: general internal RTS error 254 program deadlocked 253 program interrupted (ctrl-C) 252 heap overflow 251 main thread killed 250 and we leave exit codes 1-199 for the user (as is traditional at MS, 200-249 are reserved for future expansion, and may contain undocumented extensions :-)
* [project @ 1999-11-02 15:05:38 by simonmar]simonmar1999-11-021-10/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* [project @ 1999-09-16 08:29:01 by sof]sof1999-09-161-31/+1
| | | | | | Move DllMain() into separate file + it doesn't call startupHaskell() any longer upon loading of the DLL. That is the task of clients of the RTS.
* [project @ 1999-07-14 13:38:27 by simonmar]simonmar1999-07-141-3/+2
| | | | use shutdownHaskellAndExit().
* [project @ 1999-07-06 15:05:49 by sof]sof1999-07-061-1/+2
| | | | Added needed includes of SchedAPI.h
* [project @ 1999-05-10 10:06:24 by sof]sof1999-05-101-2/+2
| | | | oops, args to startupHaskell() wrong way around
* [project @ 1999-05-10 08:23:55 by sof]sof1999-05-101-6/+41
| | | | Added a DllMain() which starts up RTS upon DLL load.
* [project @ 1999-03-03 19:20:41 by sof]sof1999-03-031-2/+3
| | | | Win32 DLL tweaks
* [project @ 1999-02-26 16:46:50 by simonm]simonm1999-02-261-3/+1
| | | | Back out accidental commits.
* [project @ 1999-02-26 16:44:13 by simonm]simonm1999-02-261-1/+3
| | | | Fix small stats bug in the -G1 case.
* [project @ 1999-01-21 10:31:41 by simonm]simonm1999-01-211-3/+10
| | | | | Resurrect ticky-ticky profiling. Not quite polished yet, but it compiles and produces some reasonable-looking stats.
* [project @ 1998-12-02 13:17:09 by simonm]simonm1998-12-021-0/+67
Move 4.01 onto the main trunk.