summaryrefslogtreecommitdiff
path: root/rts/Task.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix #3236: emit a helpful error message when the RTS has not been initialisedSimon Marlow2009-05-181-5/+18
|
* Fix some more shutdown racesSimon Marlow2008-11-191-17/+14
| | | | | | | There were races between workerTaskStop() and freeTaskManager(): we need to be sure that all Tasks have exited properly before we start tearing things down. This isn't completely straighforward, see comments for details.
* Pad Capabilities and Tasks to 64 bytesSimon Marlow2008-10-231-1/+2
| | | | | This is just good practice to avoid placing two structures heavily accessed by different CPUs on the same cache line
* workerTaskStop(): set task->cap = NULLSimon Marlow2007-03-061-0/+1
| | | | avoids an assertion failure in newBoundTask()
* Free thread local storage on shutdownIan Lynagh2007-02-221-0/+3
|
* freeTaskManager: don't free Tasks that are still in useSimon Marlow2007-02-201-4/+10
| | | | See conc059.
* Free all tasks on exit, not just those on the task_free_listIan Lynagh2006-12-151-2/+3
|
* Put the task on the free list in workerTaskStopIan Lynagh2006-12-151-0/+5
|
* Don't free sched_mutex until freeTaskManager has finished with itSimon Marlow2006-12-121-11/+5
| | | | Also move closeMutex() etc. into freeTaskManager, this is a free-ish thing
* Add freeScheduler/freeTaskManager and call it later than exitSchedulerIan Lynagh2006-12-111-3/+17
| | | | | | | | | We were freeing the tasks in exitScheduler (stopTaskManager) before exitStorage (stat_exit), but the latter needs to walk down the list printing stats. Resulted in segfaults with commands like ghc -v0 -e main q.hs -H32m -H32m +RTS -Sstderr (where q.hs is trivial), but very sensitive to exact commandline and libc version or something.
* Split GC.c, and move storage manager into sm/ directorySimon Marlow2006-10-241-0/+1
| | | | | | | | | | | | | | | | | In preparation for parallel GC, split up the monolithic GC.c file into smaller parts. Also in this patch (and difficult to separate, unfortunatley): - Don't include Stable.h in Rts.h, instead just include it where necessary. - consistently use STATIC_INLINE in source files, and INLINE_HEADER in header files. STATIC_INLINE is now turned off when DEBUG is on, to make debugging easier. - The GC no longer takes the get_roots function as an argument. We weren't making use of this generalisation.
* free the task *after* calling closeCond and closeMutexSimon Marlow2006-08-311-1/+1
|
* add sysErrorBelch() for reporting system call errorsSimon Marlow2006-08-301-1/+2
|
* Add closeMutex and use it on clean upEsa Ilari Vuokko2006-08-231-0/+4
|
* Match format strings and arguments for printf-like functionssven.panne@aedion.de2006-08-101-2/+2
|
* fix bug in task freeingSimon Marlow2006-08-091-1/+1
|
* Remove the artifical cap on the number of workersSimon Marlow2006-08-091-10/+0
| | | | | | | | | | | | See #805. This was here to catch bugs that resulted in an infinite number of worker threads being created. However, we can't put a reasonable bound on the number of worker threads, because legitimate programs may need to create large numbers of (probably blocked) worker threads. Furthermore, the OS probably has a bound on the number of threads that a process can create in any case.
* Remember to free() memory on exitSimon Marlow2006-08-081-0/+10
| | | | | Patch mostly from Lennart Augustsson in #803, with additions to Task.c by me.
* make compilation a little less noisySimon Marlow2006-06-161-2/+2
|
* allow the max number of workers to scale with +RTS -NSimon Marlow2006-06-161-0/+4
|
* New tracing interfaceSimon Marlow2006-06-081-5/+8
| | | | | | | | A simple interface for generating trace messages with timestamps and thread IDs attached to them. Most debugging output goes through this interface now, so it is straightforward to get timestamped debugging traces with +RTS -vt. Also, we plan to use this to generate parallelism profiles from the trace output.
* Gather timing stats for a Task when it completes.Simon Marlow2006-06-071-12/+19
| | | | | Previously we did this just for workers, now we do it for the main thread and for forkOS threads too.
* Reorganisation of the source treeSimon Marlow2006-04-071-0/+315
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.