diff options
author | David Malcolm <dmalcolm@redhat.com> | 2014-12-09 18:51:04 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2014-12-09 18:51:04 +0000 |
commit | 38771e4e1fdacfbdac5a14e50fcc0538577b1bdb (patch) | |
tree | dcf6ca65f430649752f2bbeab9e80301f3820f24 /gcc/jit/notes.txt | |
parent | 38f4f64124c88933acc76325a256950d468022fa (diff) | |
download | gcc-38771e4e1fdacfbdac5a14e50fcc0538577b1bdb.zip gcc-38771e4e1fdacfbdac5a14e50fcc0538577b1bdb.tar.gz gcc-38771e4e1fdacfbdac5a14e50fcc0538577b1bdb.tar.bz2 |
Guard less code with the JIT mutex
gcc/jit/ChangeLog:
* jit-playback.c (gcc::jit::playback::context::compile): Acquire the
mutex here, immediately before using toplev, and release it here, on
each exit path after acquisition.
(jit_mutex): Move this variable here, from jit-recording.c.
(gcc::jit::playback::context::acquire_mutex): New function, based on
code in jit-recording.c.
(gcc::jit::playback::context::release_mutex): Likewise.
* jit-playback.h (gcc::jit::playback::context::acquire_mutex): New
function.
(gcc::jit::playback::context::release_mutex): New function.
* jit-recording.c (jit_mutex): Move this variable to jit-playback.c.
(gcc::jit::recording::context::compile): Move mutex-handling from
here into jit-playback.c's gcc::jit::playback::context::compile.
* notes.txt: Update to show the new locations of ACQUIRE_MUTEX
and RELEASE_MUTEX.
From-SVN: r218528
Diffstat (limited to 'gcc/jit/notes.txt')
-rw-r--r-- | gcc/jit/notes.txt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/jit/notes.txt b/gcc/jit/notes.txt index 12bb6d6..26f381e 100644 --- a/gcc/jit/notes.txt +++ b/gcc/jit/notes.txt @@ -20,11 +20,11 @@ Client Code . Generated . libgccjit.so ──────────────────────────> . . . . │ start of recording::context::compile () . . │ . . - . . │ ACQUIRE MUTEX . - . . │ . . . . │ start of playback::context::compile () . . │ (create tempdir) . . . │ . . + . . │ ACQUIRE MUTEX . + . . │ . . . . V───────────────────────> toplev::main (for now) . . . . │ . . . . (various code) @@ -78,6 +78,8 @@ Client Code . Generated . libgccjit.so . . │ . . . . │ Load DSO (dlopen "fake.so") . . │ . . + . . │ RELEASE MUTEX . + . . │ . . . . │ end of playback::context::compile () . . │ . . . . │ playback::context dtor @@ -87,8 +89,6 @@ Client Code . Generated . libgccjit.so . . │ filesystem at this point) . . <── . . . . │ . . - . . │ RELEASE MUTEX . - . . │ . . . . │ end of recording::context::compile () <─────────────────────────── . . │ . . . . |