Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rubinius/rubinius
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: d9d8b4cea220
Choose a base ref
...
head repository: rubinius/rubinius
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 854648a99067
Choose a head ref
  • 3 commits
  • 17 files changed
  • 1 contributor

Commits on Jun 22, 2015

  1. More locking fixes.

    brixen committed Jun 22, 2015
    Copy the full SHA
    19e3174 View commit details
  2. Copy the full SHA
    3f00924 View commit details
  3. Copy the full SHA
    854648a View commit details
Showing with 61 additions and 329 deletions.
  1. +0 −8 vm/builtin/channel.cpp
  2. +0 −4 vm/builtin/compiled_code.cpp
  3. +1 −2 vm/gc/managed.cpp
  4. +1 −2 vm/gc/managed.hpp
  5. +2 −4 vm/global_cache.hpp
  6. +0 −2 vm/internal_threads.hpp
  7. +0 −22 vm/lock.cpp
  8. +0 −240 vm/lock.hpp
  9. +5 −11 vm/object_memory.cpp
  10. +1 −2 vm/object_memory.hpp
  11. +2 −1 vm/park.cpp
  12. +13 −9 vm/shared_state.cpp
  13. +13 −4 vm/shared_state.hpp
  14. +2 −0 vm/state.cpp
  15. +0 −10 vm/state.hpp
  16. +13 −8 vm/vm.cpp
  17. +8 −0 vm/vm.hpp
8 changes: 0 additions & 8 deletions vm/builtin/channel.cpp
Original file line number Diff line number Diff line change
@@ -133,20 +133,12 @@ namespace rubinius {
ts.tv_nsec = nano % NANOSECONDS;
}

// We lock to manipulate the wait condition on the VM* so that
// we can sync up properly with another thread trying to wake us
// up right as we're trying to go to sleep.
state->lock(gct, call_frame);

if(!state->check_async(call_frame)) {
state->unlock();
return NULL;
}

state->vm()->wait_on_channel(self);

state->unlock();

self->waiters_++;

bool exception = false;
4 changes: 0 additions & 4 deletions vm/builtin/compiled_code.cpp
Original file line number Diff line number Diff line change
@@ -205,8 +205,6 @@ namespace rubinius {
Object* CompiledCode::default_executor(STATE, CallFrame* call_frame,
Executable* exec, Module* mod, Arguments& args)
{
LockableScopedLock lg(state, &state->shared(), __FILE__, __LINE__);

CompiledCode* code = as<CompiledCode>(exec);
if(code->execute == default_executor) {
const char* reason = 0;
@@ -224,8 +222,6 @@ namespace rubinius {
}
}

lg.unlock();

return code->execute(state, call_frame, exec, mod, args);
}

3 changes: 1 addition & 2 deletions vm/gc/managed.cpp
Original file line number Diff line number Diff line change
@@ -12,8 +12,7 @@ namespace rubinius {

ManagedThread::ManagedThread(uint32_t id, SharedState& ss,
ManagedThread::Kind kind, const char* name)
: Lockable(true)
, shared_(ss)
: shared_(ss)
, run_state_(eIndependent)
, kind_(kind)
, os_thread_(pthread_self())
3 changes: 1 addition & 2 deletions vm/gc/managed.hpp
Original file line number Diff line number Diff line change
@@ -5,7 +5,6 @@
#include "gc/variable_buffer.hpp"
#include "gc/root_buffer.hpp"
#include "gc/root.hpp"
#include "lock.hpp"
#include "metrics.hpp"

#include <algorithm>
@@ -19,7 +18,7 @@ namespace rubinius {

typedef std::vector<ObjectHeader*> LockedObjects;

class ManagedThread : public Lockable {
class ManagedThread {
public:
// WorldState sets the run_state_ directly.
friend class WorldState;
6 changes: 2 additions & 4 deletions vm/global_cache.hpp
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ namespace rubinius {

typedef std_unordered_set<native_int> SeenMethodSet;

class GlobalCache : public Lockable {
class GlobalCache {
public:
struct CacheEntry {
Module* klass;
@@ -44,9 +44,7 @@ namespace rubinius {
static bool resolve(STATE, Symbol* name, Dispatch& msg, LookupData& lookup);
bool resolve_i(STATE, Symbol* name, Dispatch& msg, LookupData& lookup);

GlobalCache()
: Lockable(true)
{
GlobalCache() {
reset();
}

2 changes: 0 additions & 2 deletions vm/internal_threads.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#ifndef RBX_AUXILIARY_THREADS_H
#define RBX_AUXILIARY_THREADS_H

#include "lock.hpp"

#include "util/thread.hpp"

#include <string>
22 changes: 0 additions & 22 deletions vm/lock.cpp

This file was deleted.

240 changes: 0 additions & 240 deletions vm/lock.hpp

This file was deleted.

Loading