-/* -----------------------------------------------------------------------------
- * Function: initCapabilities_(nat)
- *
- * Purpose: upon startup, allocate and fill in table
- * holding 'n' Capabilities. Only for SMP, since
- * it is the only build that supports multiple
- * capabilities within the RTS.
- * -------------------------------------------------------------------------- */
-#if defined(SMP)
-static void
-initCapabilities_(nat n)
-{
- nat i;
- Capability *cap, *prev;
- cap = NULL;
- prev = NULL;
- for (i = 0; i < n; i++) {
- cap = stgMallocBytes(sizeof(Capability), "initCapabilities");
- initCapability(cap);
- cap->link = prev;
- prev = cap;
- }
- free_capabilities = cap;
- rts_n_free_capabilities = n;
- IF_DEBUG(scheduler,
- sched_belch("allocated %d capabilities", rts_n_free_capabilities));
-}
-#endif /* SMP */
-