summaryrefslogtreecommitdiff
path: root/rts/Schedule.h
diff options
context:
space:
mode:
authorDuncan Coutts <duncan@well-typed.com>2020-12-29 16:39:36 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-11-22 02:06:17 -0500
commit5cf709c541a46a17ef2e36d589ba13d949d058e1 (patch)
treedbd2e595dbd3af2a3f904b084de3aa74e2099a8e /rts/Schedule.h
parent8901285ef64ab4aa16aa34096a1e2be42d4be246 (diff)
downloadhaskell-5cf709c541a46a17ef2e36d589ba13d949d058e1.tar.gz
Move APPEND_TO_BLOCKED_QUEUE from cmm to C
The I/O and delay blocking primitives for the non-threaded way currently access the blocked_queue and sleeping_queue directly. We want to move where those queues are to make their ownership clearer: to have them clearly belong to the I/O manager impls rather than to the scheduler. Ultimately we will want to change their representation too. It's inconvenient to do that if these queues are accessed directly from cmm code. So as a first step, replace the APPEND_TO_BLOCKED_QUEUE with a C version appendToIOBlockedQueue(), and replace the open-coded sleeping_queue insertion with insertIntoSleepingQueue().
Diffstat (limited to 'rts/Schedule.h')
-rw-r--r--rts/Schedule.h16
1 files changed, 0 insertions, 16 deletions
diff --git a/rts/Schedule.h b/rts/Schedule.h
index eda0aa3f79..d12a85cfbd 100644
--- a/rts/Schedule.h
+++ b/rts/Schedule.h
@@ -155,22 +155,6 @@ peekRunQueue (Capability *cap)
void promoteInRunQueue (Capability *cap, StgTSO *tso);
-/* Add a thread to the end of the blocked queue.
- */
-#if !defined(THREADED_RTS)
-INLINE_HEADER void
-appendToBlockedQueue(StgTSO *tso)
-{
- ASSERT(tso->_link == END_TSO_QUEUE);
- if (blocked_queue_hd == END_TSO_QUEUE) {
- blocked_queue_hd = tso;
- } else {
- setTSOLink(&MainCapability, blocked_queue_tl, tso);
- }
- blocked_queue_tl = tso;
-}
-#endif
-
/* Check whether various thread queues are empty
*/
INLINE_HEADER bool