diff options
author | Duncan Coutts <duncan@well-typed.com> | 2021-12-14 16:13:51 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-11-22 02:06:17 -0500 |
commit | 39a91f60d958247cffdd6e10ac58030bc72ce464 (patch) | |
tree | 1e294d5bba420be2f6b895dd7025fad16bcf00b7 /rts/Schedule.h | |
parent | 0f68919ee6ef7ed77c79008e9e807d39919fadc0 (diff) | |
download | haskell-39a91f60d958247cffdd6e10ac58030bc72ce464.tar.gz |
Move macros for checking for pending IO or timers
from Schedule.h to Schedule.c and IOManager.h
This is just moving, the next step will be to rejig them slightly.
For the non-threaded RTS the scheduler needs to be able to test for
there being pending I/O operation or pending timers. The implementation
of these tests should really be considered to be part of the I/O
managers and not part of the scheduler.
Diffstat (limited to 'rts/Schedule.h')
-rw-r--r-- | rts/Schedule.h | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/rts/Schedule.h b/rts/Schedule.h index 64f9f7d166..b0898b9a4c 100644 --- a/rts/Schedule.h +++ b/rts/Schedule.h @@ -174,22 +174,6 @@ truncateRunQueue(Capability *cap) cap->n_run_queue = 0; } -#if !defined(THREADED_RTS) -#define EMPTY_BLOCKED_QUEUE(cap) (emptyQueue(cap->iomgr->blocked_queue_hd)) -#define EMPTY_SLEEPING_QUEUE(cap) (emptyQueue(cap->iomgr->sleeping_queue)) -#endif - -INLINE_HEADER bool -emptyThreadQueues(Capability *cap) -{ - return emptyRunQueue(cap) -#if !defined(THREADED_RTS) - // TODO replace this by a test that deferrs to the active I/O manager - && EMPTY_BLOCKED_QUEUE(cap) && EMPTY_SLEEPING_QUEUE(cap) -#endif - ; -} - #endif /* !IN_STG_CODE */ #include "EndPrivate.h" |