+// Initialised the available capabilities.
+//
+extern void initCapabilities( void );
+
+// Releases a capability
+//
+extern void releaseCapability( Capability* cap );
+
+#ifdef RTS_SUPPORTS_THREADS
+// Gives up the current capability IFF there is a higher-priority
+// thread waiting for it. This happens in one of two ways:
+//
+// (a) we are passing the capability to another OS thread, so
+// that it can run a bound Haskell thread, or
+//
+// (b) there is an OS thread waiting to return from a foreign call
+//
+// On return: *pCap is NULL if the capability was released. The
+// current worker thread should then re-acquire it using
+// waitForCapability().
+//
+extern void yieldCapability( Capability **pCap );
+
+// Acquires a capability for doing some work.
+//
+// If the current OS thread is bound to a particular Haskell thread,
+// then pThreadCond points to a condition variable for waking up this
+// OS thread when its Haskell thread is ready to run.
+//
+// On return: pCap points to the capability.
+extern void waitForCapability( Mutex* pMutex, Capability** pCap,
+ Condition *pThreadCond );
+
+// Acquires a capability at a return point.
+//
+// OS threads waiting in this function get priority over those waiting
+// in waitForWorkCapability().
+//
+// On return: pCap points to the capability.
+extern void waitForReturnCapability(Mutex* pMutex, Capability** pCap);