summaryrefslogtreecommitdiff
path: root/rts/LinkerInternals.h
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2014-09-26 20:08:43 +0100
committerSimon Marlow <marlowsd@gmail.com>2014-11-28 14:10:32 +0000
commitb5e8b3b162b3ff15ae6caf1afc659565365f54a8 (patch)
tree87e99c82b570a80340c624c88b6232747e4b66f4 /rts/LinkerInternals.h
parent58dcd5c2e2a94643454296ea0bb109db96bd154f (diff)
downloadhaskell-b5e8b3b162b3ff15ae6caf1afc659565365f54a8.tar.gz
Make the linker API thread-safe
We used to be able to rely on the client to use the API in a single-threaded way, but now that the GC calls into the linker to unload objects this isn't a safe assumption.
Diffstat (limited to 'rts/LinkerInternals.h')
-rw-r--r--rts/LinkerInternals.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/rts/LinkerInternals.h b/rts/LinkerInternals.h
index e1942bc8ae..4fe533b903 100644
--- a/rts/LinkerInternals.h
+++ b/rts/LinkerInternals.h
@@ -144,6 +144,10 @@ typedef struct _ObjectCode {
extern ObjectCode *objects;
extern ObjectCode *unloaded_objects;
+#ifdef THREADED_RTS
+extern Mutex linker_mutex;
+#endif
+
void exitLinker( void );
void freeObjectCode (ObjectCode *oc);