projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Relax the assumption that all objects fit in a single block (#3424)
[ghc-hetmet.git]
/
rts
/
posix
/
Select.c
diff --git
a/rts/posix/Select.c
b/rts/posix/Select.c
index
bf4b7ae
..
46db405
100644
(file)
--- a/
rts/posix/Select.c
+++ b/
rts/posix/Select.c
@@
-6,19
+6,16
@@
*
* ---------------------------------------------------------------------------*/
*
* ---------------------------------------------------------------------------*/
-/* we're outside the realms of POSIX here... */
-/* #include "PosixSource.h" */
-
+#include "PosixSource.h"
#include "Rts.h"
#include "Rts.h"
-#include "Storage.h"
+
+#include "Signals.h"
#include "Schedule.h"
#include "RtsUtils.h"
#include "Schedule.h"
#include "RtsUtils.h"
-#include "RtsFlags.h"
-#include "Timer.h"
#include "Itimer.h"
#include "Itimer.h"
-#include "Signals.h"
#include "Capability.h"
#include "Capability.h"
-#include "posix/Select.h"
+#include "Select.h"
+#include "AwaitEvent.h"
# ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
# ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
@@
-60,9
+57,15
@@
wakeUpSleepingThreads(lnat ticks)
StgTSO *tso;
rtsBool flag = rtsFalse;
StgTSO *tso;
rtsBool flag = rtsFalse;
- while (sleeping_queue != END_TSO_QUEUE &&
- (int)(ticks - sleeping_queue->block_info.target) >= 0) {
+ while (sleeping_queue != END_TSO_QUEUE) {
tso = sleeping_queue;
tso = sleeping_queue;
+ if (tso->what_next == ThreadRelocated) {
+ sleeping_queue = tso->_link;
+ continue;
+ }
+ if (((long)ticks - (long)tso->block_info.target) < 0) {
+ break;
+ }
sleeping_queue = tso->_link;
tso->why_blocked = NotBlocked;
tso->_link = END_TSO_QUEUE;
sleeping_queue = tso->_link;
tso->why_blocked = NotBlocked;
tso->_link = END_TSO_QUEUE;