- 14 Sep, 2010 1 commit
-
-
Simon Marlow authored
-
- 27 Jan, 2010 1 commit
-
-
Simon Marlow authored
-
- 03 Aug, 2009 1 commit
-
-
Simon Marlow authored
-
- 18 Mar, 2009 1 commit
-
-
Simon Marlow authored
-
- 17 Mar, 2009 1 commit
-
-
Simon Marlow authored
Somebody needs to implement getNumberOfProcessors() for MacOS X, currently it will return 1.
-
- 29 Aug, 2007 1 commit
-
-
Simon Marlow authored
The C-- parser was missing the "stdcall" calling convention for foreign calls, but once added we can call {Enter,Leave}CricialSection directly.
-
- 16 Aug, 2007 1 commit
-
-
Ian Lynagh authored
When calling EnterCriticalSection and LeaveCriticalSection from C-- code, we go via wrappers which use ccall (rather than stdcall).
-
- 22 Feb, 2007 1 commit
-
-
Ian Lynagh authored
-
- 01 Feb, 2007 1 commit
-
-
Simon Marlow authored
It seems that when a program exits with open DLLs on Windows, the system attempts to shut down the DLLs, but it also terminates (some of?) the running threads. The RTS isn't prepared for threads to die unexpectedly, so it sits around waiting for its workers to finish. This bites in two places: ShutdownIOManager() in the the unthreaded RTS, and shutdownCapability() in the threaded RTS. So far I've modified the latter to notice when worker threads have died unexpectedly and continue shutting down. It seems a bit trickier to fix the unthreaded RTS, so for now the workaround for #926 is to use the threaded RTS.
-
- 30 Aug, 2006 1 commit
-
-
Simon Marlow authored
-
- 23 Aug, 2006 1 commit
-
-
ei@vuokko.info authored
-
- 07 Apr, 2006 1 commit
-
-
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.
-
- 04 Nov, 2005 1 commit
-
-
simonmar authored
Win32: Use CriticalSections instead of Mutexes, they are *much* faster.
-
- 03 Nov, 2005 1 commit
-
-
simonmar authored
avoid a warning
-
- 27 Oct, 2005 1 commit
-
-
simonmar authored
Fix getThreadLocalVar() on Win32 - thanks for Krasimir for finding the bug.
-
- 26 Oct, 2005 1 commit
-
-
simonmar authored
forkOS_createThreadWrapper: oops, better use the result from rts_evalStableIO()
-
- 21 Oct, 2005 2 commits
-
-
simonmar authored
wibble
-
simonmar authored
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
-
- 03 Sep, 2004 1 commit
-
-
simonmar authored
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).
-
- 01 Mar, 2004 2 commits
- 26 Feb, 2004 2 commits
- 26 Sep, 2003 1 commit
-
-
panne authored
Warning police
-
- 24 Sep, 2003 1 commit
-
-
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.
-
- 19 Sep, 2003 1 commit
-
-
wolfgang authored
POSIX threads should be pthread_detach-ed after they are created. Otherwise they'll stick around waiting for a pthread_join. (This wasn't really a problem because our worker threads never exit anyway).
-
- 15 Feb, 2002 1 commit
-
-
sof authored
wibble
-
- 14 Feb, 2002 2 commits
- 04 Feb, 2002 1 commit
-
-
sof authored
- renamed MutexVar to Mutex, CondVar to Condition. - added yieldThread(). - simplified/specialised type of entry point to new (native) threads; now takes no args & returns no result.
-
- 31 Jan, 2002 2 commits
-
-
sof authored
Win32 implementation, first pass.
-
sof authored
First steps towards implementing better interop between Concurrent Haskell and native threads. - factored out Capability handling into a separate source file (only the SMP build uses multiple capabilities tho). - factored out OS/native threads handling into a separate source file, OSThreads.{c,h}. Currently, just a pthreads-based implementation; Win32 version to follow. - scheduler code now distinguishes between multi-task threaded code (SMP) and single-task threaded code ('threaded RTS'), but sharing code between these two modes whenever poss. i.e., just a first snapshot; the bulk of the transitioning code remains to be implemented.
-