summaryrefslogtreecommitdiff
path: root/rts/Schedule.c
diff options
context:
space:
mode:
authorAndreas Klebinger <klebinger.andreas@gmx.at>2020-04-20 16:40:42 +0200
committerBen Gamari <ben@smart-cactus.org>2020-07-15 16:41:02 -0400
commitcc5d7bb1dcf5603ac47320e83e4fc9ef53e409e9 (patch)
tree11daeccc9c18522b727e890179649ccf5c8ebd7f /rts/Schedule.c
parentf47c7208c31bdd695ba46e6bdf4a349ae46c79bc (diff)
downloadhaskell-cc5d7bb1dcf5603ac47320e83e4fc9ef53e409e9.tar.gz
winio: Queue IO processing threads at the front of the queue.
This will unblock the IO thread sooner hopefully leading to higher throughput in some situations.
Diffstat (limited to 'rts/Schedule.c')
-rw-r--r--rts/Schedule.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/rts/Schedule.c b/rts/Schedule.c
index 8c120c093e..6b10326859 100644
--- a/rts/Schedule.c
+++ b/rts/Schedule.c
@@ -2577,6 +2577,14 @@ scheduleThread(Capability *cap, StgTSO *tso)
}
void
+scheduleThreadNow(Capability *cap, StgTSO *tso)
+{
+ // The thread goes at the *beginning* of the run-queue,
+ // in order to execute it as soon as possible.
+ pushOnRunQueue(cap,tso);
+}
+
+void
scheduleThreadOn(Capability *cap, StgWord cpu USED_IF_THREADS, StgTSO *tso)
{
tso->flags |= TSO_LOCKED; // we requested explicit affinity; don't