import base_ControlziExceptionziBase_nestedAtomically_closure;
import EnterCriticalSection;
import LeaveCriticalSection;
-import ghczmprim_GHCziBool_False_closure;
+import ghczmprim_GHCziTypes_False_closure;
#if !defined(mingw32_HOST_OS)
import sm_mutex;
#endif
n = R1;
alignment = R2;
+ /* we always supply at least word-aligned memory, so there's no
+ need to allow extra space for alignment if the requirement is less
+ than a word. This also prevents mischief with alignment == 0. */
+ if (alignment <= SIZEOF_W) { alignment = 1; }
+
bytes = n;
/* payload_words is what we will tell the profiler we had to allocate */
W_ spark;
#ifndef THREADED_RTS
- RET_NP(0,ghczmprim_GHCziBool_False_closure);
+ RET_NP(0,ghczmprim_GHCziTypes_False_closure);
#else
(spark) = foreign "C" findSpark(MyCapability());
if (spark != 0) {
RET_NP(1,spark);
} else {
- RET_NP(0,ghczmprim_GHCziBool_False_closure);
+ RET_NP(0,ghczmprim_GHCziTypes_False_closure);
}
#endif
}
+stg_numSparkszh
+{
+ W_ n;
+#ifdef THREADED_RTS
+ (n) = foreign "C" dequeElements(Capability_sparks(MyCapability()));
+#else
+ n = 0;
+#endif
+ RET_N(n);
+}
+
stg_traceEventzh
{
W_ msg;