Gentoo Archives: gentoo-commits

From: "Sergei Trofimovich (slyfox)" <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-lang/ghc/files: ghc-7.10.1-T10590-dequeue.patch ghc-7.10.1-rc3-ghc-7.10-bootstrap.patch
Date: Sat, 01 Aug 2015 21:22:12
Message-Id: 20150801212203.ABF14119@oystercatcher.gentoo.org
1 slyfox 15/08/01 21:22:03
2
3 Added: ghc-7.10.1-T10590-dequeue.patch
4 ghc-7.10.1-rc3-ghc-7.10-bootstrap.patch
5 Log:
6 Version bump, bug #544668 by Jonas Jelten
7
8 (Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 611FF3AA)
9
10 Revision Changes Path
11 1.1 dev-lang/ghc/files/ghc-7.10.1-T10590-dequeue.patch
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ghc/files/ghc-7.10.1-T10590-dequeue.patch?rev=1.1&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ghc/files/ghc-7.10.1-T10590-dequeue.patch?rev=1.1&content-type=text/plain
15
16 Index: ghc-7.10.1-T10590-dequeue.patch
17 ===================================================================
18 diff --git a/rts/RaiseAsync.c b/rts/RaiseAsync.c
19 index 3b206ff..08c031c 100644
20 --- a/rts/RaiseAsync.c
21 +++ b/rts/RaiseAsync.c
22 @@ -56,7 +56,8 @@ static void throwToSendMsg (Capability *cap USED_IF_THREADS,
23
24 static void
25 throwToSingleThreaded__ (Capability *cap, StgTSO *tso, StgClosure *exception,
26 - rtsBool stop_at_atomically, StgUpdateFrame *stop_here)
27 + rtsBool stop_at_atomically, StgUpdateFrame *stop_here,
28 + rtsBool dequeue)
29 {
30 // Thread already dead?
31 if (tso->what_next == ThreadComplete || tso->what_next == ThreadKilled) {
32 @@ -64,7 +65,9 @@ throwToSingleThreaded__ (Capability *cap, StgTSO *tso, StgClosure *exception,
33 }
34
35 // Remove it from any blocking queues
36 - removeFromQueues(cap,tso);
37 + if (dequeue) {
38 + removeFromQueues(cap,tso);
39 + }
40
41 raiseAsync(cap, tso, exception, stop_at_atomically, stop_here);
42 }
43 @@ -72,20 +75,26 @@ throwToSingleThreaded__ (Capability *cap, StgTSO *tso, StgClosure *exception,
44 void
45 throwToSingleThreaded (Capability *cap, StgTSO *tso, StgClosure *exception)
46 {
47 - throwToSingleThreaded__(cap, tso, exception, rtsFalse, NULL);
48 + throwToSingleThreaded__(cap, tso, exception, rtsFalse, NULL, rtsTrue);
49 +}
50 +
51 +void
52 +throwToSingleThreadedNoDequeue (Capability *cap, StgTSO *tso, StgClosure *exception)
53 +{
54 + throwToSingleThreaded__(cap, tso, exception, rtsFalse, NULL, rtsFalse);
55 }
56
57 void
58 throwToSingleThreaded_ (Capability *cap, StgTSO *tso, StgClosure *exception,
59 rtsBool stop_at_atomically)
60 {
61 - throwToSingleThreaded__ (cap, tso, exception, stop_at_atomically, NULL);
62 + throwToSingleThreaded__ (cap, tso, exception, stop_at_atomically, NULL, rtsTrue);
63 }
64
65 void // cannot return a different TSO
66 suspendComputation (Capability *cap, StgTSO *tso, StgUpdateFrame *stop_here)
67 {
68 - throwToSingleThreaded__ (cap, tso, NULL, rtsFalse, stop_here);
69 + throwToSingleThreaded__ (cap, tso, NULL, rtsFalse, stop_here, rtsTrue);
70 }
71
72 /* -----------------------------------------------------------------------------
73 diff --git a/rts/RaiseAsync.h b/rts/RaiseAsync.h
74 index 6bfed8d..2e8a7a3 100644
75 --- a/rts/RaiseAsync.h
76 +++ b/rts/RaiseAsync.h
77 @@ -23,6 +23,10 @@ void throwToSingleThreaded (Capability *cap,
78 StgTSO *tso,
79 StgClosure *exception);
80
81 +void throwToSingleThreadedNoDequeue (Capability *cap,
82 + StgTSO *tso,
83 + StgClosure *exception);
84 +
85 void throwToSingleThreaded_ (Capability *cap,
86 StgTSO *tso,
87 StgClosure *exception,
88 diff --git a/rts/posix/Select.c b/rts/posix/Select.c
89 index 4b19235..6889499 100644
90 --- a/rts/posix/Select.c
91 +++ b/rts/posix/Select.c
92 @@ -412,8 +412,12 @@ awaitEvent(rtsBool wait)
93 IF_DEBUG(scheduler,
94 debugBelch("Killing blocked thread %lu on bad fd=%i\n",
95 (unsigned long)tso->id, fd));
96 - throwToSingleThreaded(&MainCapability, tso,
97 - (StgClosure *)blockedOnBadFD_closure);
98 + /*
99 + * We can't use throwToSingleThreaded() here
100 + * as 'RTS_FD_IS_READY' breaks blocked_queue_hd list
101 + */
102 + throwToSingleThreadedNoDequeue(&MainCapability, tso,
103 + (StgClosure *)blockedOnBadFD_closure);
104 break;
105 case RTS_FD_IS_READY:
106 IF_DEBUG(scheduler,
107
108
109
110 1.1 dev-lang/ghc/files/ghc-7.10.1-rc3-ghc-7.10-bootstrap.patch
111
112 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ghc/files/ghc-7.10.1-rc3-ghc-7.10-bootstrap.patch?rev=1.1&view=markup
113 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/ghc/files/ghc-7.10.1-rc3-ghc-7.10-bootstrap.patch?rev=1.1&content-type=text/plain
114
115 Index: ghc-7.10.1-rc3-ghc-7.10-bootstrap.patch
116 ===================================================================
117 --- ghc-7.10.0.20150316-orig/compiler/utils/Pair.hs 2015-03-10 05:43:13.000000000 +1100
118 +++ ghc-7.10.0.20150316/compiler/utils/Pair.hs 2015-03-17 09:50:48.491115080 +1100
119 @@ -15,6 +15,8 @@
120 import Data.Foldable
121 import Data.Monoid
122 import Data.Traversable
123 +#else
124 +import Control.Applicative ((<$>))
125 #endif
126
127 data Pair a = Pair { pFst :: a, pSnd :: a }
128 --- ghc-7.10.0.20150316-orig/compiler/types/Coercion.hs 2015-03-10 05:43:13.000000000 +1100
129 +++ ghc-7.10.0.20150316/compiler/types/Coercion.hs 2015-03-17 10:11:21.636047380 +1100
130 @@ -104,6 +104,8 @@
131 #if __GLASGOW_HASKELL__ < 709
132 import Control.Applicative hiding ( empty )
133 import Data.Traversable (traverse, sequenceA)
134 +#else
135 +import Control.Applicative ((<$>))
136 #endif
137 import FastString
138 import ListSetOps
139 --- ghc-7.10.0.20150316-orig/compiler/typecheck/TcEvidence.hs 2015-03-14 08:48:57.000000000 +1100
140 +++ ghc-7.10.0.20150316/compiler/typecheck/TcEvidence.hs 2015-03-17 10:26:03.251433371 +1100
141 @@ -50,6 +50,8 @@
142 #if __GLASGOW_HASKELL__ < 709
143 import Control.Applicative
144 import Data.Traversable (traverse, sequenceA)
145 +#else
146 +import Control.Applicative ((<$>))
147 #endif
148 import qualified Data.Data as Data
149 import Outputable
150 --- ghc-7.10.0.20150316-orig/compiler/hsSyn/HsBinds.hs 2015-03-10 05:43:13.000000000 +1100
151 +++ ghc-7.10.0.20150316/compiler/hsSyn/HsBinds.hs 2015-03-17 10:42:21.459519033 +1100
152 @@ -47,6 +47,8 @@
153 import Data.Traversable ( Traversable(..) )
154 import Data.Monoid ( mappend )
155 import Control.Applicative hiding (empty)
156 +#else
157 +import Control.Applicative ((<$>))
158 #endif
159
160 {-
161 --- ghc-7.10.0.20150316-orig/compiler/parser/RdrHsSyn.hs 2015-03-10 05:43:13.000000000 +1100
162 +++ ghc-7.10.0.20150316/compiler/parser/RdrHsSyn.hs 2015-03-17 11:17:48.950929542 +1100
163 @@ -91,9 +91,7 @@
164 import Util
165 import ApiAnnotation
166
167 -#if __GLASGOW_HASKELL__ < 709
168 import Control.Applicative ((<$>))
169 -#endif
170 import Control.Monad
171
172 import Text.ParserCombinators.ReadP as ReadP
173 --- ghc-7.10.0.20150316-orig/compiler/typecheck/TcGenDeriv.hs 2015-03-14 08:48:57.000000000 +1100
174 +++ ghc-7.10.0.20150316/compiler/typecheck/TcGenDeriv.hs 2015-03-17 11:30:39.106508173 +1100
175 @@ -59,6 +59,8 @@
176 import Var
177 #if __GLASGOW_HASKELL__ < 709
178 import MonadUtils
179 +#else
180 +import Control.Applicative ((<$>))
181 #endif
182 import Outputable
183 import Lexeme
184 --- ghc-7.10.0.20150316-orig/compiler/vectorise/Vectorise/Exp.hs 2015-03-10 05:43:13.000000000 +1100
185 +++ ghc-7.10.0.20150316/compiler/vectorise/Vectorise/Exp.hs 2015-03-17 11:46:41.829481669 +1100
186 @@ -46,6 +46,8 @@
187 import Util
188 #if __GLASGOW_HASKELL__ < 709
189 import MonadUtils
190 +#else
191 +import Control.Applicative ((<$>))
192 #endif
193
194 import Control.Monad