summaryrefslogtreecommitdiff
path: root/includes/rts/Threads.h
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2011-12-06 15:12:07 +0000
committerSimon Marlow <marlowsd@gmail.com>2011-12-06 16:00:27 +0000
commit92e7d6c92fdd14de424524564376d3522f2a40cc (patch)
tree5715d44012b452f5020ca14331a1fe50d5fd9600 /includes/rts/Threads.h
parent8b75acd3ca25165536f18976c8d80cb62ad613e4 (diff)
downloadhaskell-92e7d6c92fdd14de424524564376d3522f2a40cc.tar.gz
Allow the number of capabilities to be increased at runtime (#3729)
At present the number of capabilities can only be *increased*, not decreased. The latter presents a few more challenges!
Diffstat (limited to 'includes/rts/Threads.h')
-rw-r--r--includes/rts/Threads.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/includes/rts/Threads.h b/includes/rts/Threads.h
index d2c4aff984..061e38b32b 100644
--- a/includes/rts/Threads.h
+++ b/includes/rts/Threads.h
@@ -57,4 +57,14 @@ extern unsigned int n_capabilities;
extern Capability MainCapability;
#endif
+//
+// Change the number of capabilities (only supports increasing the
+// current value at the moment).
+//
+#if defined(THREADED_RTS)
+extern void setNumCapabilities (nat new);
+#else
+extern void setNumCapabilities (nat new) GNU_ATTRIBUTE(__noreturn__);
+#endif
+
#endif /* RTS_THREADS_H */