Skip to content

Commit

Permalink
Replaced C macro approach to MemoryHeader.
Browse files Browse the repository at this point in the history
  • Loading branch information
brixen committed Feb 22, 2018
1 parent b869a1b commit 180cade
Show file tree
Hide file tree
Showing 3 changed files with 257 additions and 660 deletions.
11 changes: 11 additions & 0 deletions machine/memory/header.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,17 @@ namespace rubinius {
object_id_counter = 0;
}

void MemoryHeader::lock(STATE) {
locked_count_field.get(header);
}

bool MemoryHeader::try_lock(STATE) {
return false;
}

void MemoryHeader::unlock(STATE) {
}

bool HeaderWord::atomic_set(HeaderWord& old, HeaderWord& nw) {
return atomic::compare_and_swap(&flags64,
old.flags64,
Expand Down
Loading

0 comments on commit 180cade

Please sign in to comment.