Skip to content

Commit

Permalink
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions vm/llvm/state.cpp
Original file line number Diff line number Diff line change
@@ -248,6 +248,11 @@ namespace rubinius {
if(!compile_request || compile_request->nil_p()) continue;
}

utilities::thread::Condition* cond = compile_request->waiter();

// Don't proceed until requester has reached the wait_cond
if(cond) wait_mutex.lock();

Context ctx(this);
jit::Compiler jit(&ctx);

@@ -272,7 +277,8 @@ namespace rubinius {
}

// If someone was waiting on this, wake them up.
if(utilities::thread::Condition* cond = compile_request->waiter()) {
if(cond) {
wait_mutex.unlock();
cond->signal();
}

@@ -307,7 +313,8 @@ namespace rubinius {
<< " ]]]\n";
}
// If someone was waiting on this, wake them up.
if(utilities::thread::Condition* cond = compile_request->waiter()) {
if(cond) {
wait_mutex.unlock();
cond->signal();
}

@@ -321,7 +328,8 @@ namespace rubinius {
metrics().m.jit_metrics.methods_failed++;

// If someone was waiting on this, wake them up.
if(utilities::thread::Condition* cond = compile_request->waiter()) {
if(cond) {
wait_mutex.unlock();
cond->signal();
}
current_compiler_ = 0;
@@ -369,7 +377,8 @@ namespace rubinius {
}

// If someone was waiting on this, wake them up.
if(utilities::thread::Condition* cond = compile_request->waiter()) {
if(cond) {
wait_mutex.unlock();
cond->signal();
}

0 comments on commit 0ec0c5c

Please sign in to comment.