diff options
author | Simon Marlow <marlowsd@gmail.com> | 2014-09-26 20:08:43 +0100 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2014-11-28 14:10:32 +0000 |
commit | b5e8b3b162b3ff15ae6caf1afc659565365f54a8 (patch) | |
tree | 87e99c82b570a80340c624c88b6232747e4b66f4 /rts/LinkerInternals.h | |
parent | 58dcd5c2e2a94643454296ea0bb109db96bd154f (diff) | |
download | haskell-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.h | 4 |
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); |