Skip to content

Commit fcf7fe7

Browse files
committed
---
yaml --- r: 14159 b: refs/heads/try c: 0667fb4 h: refs/heads/master i: 14157: 9a0898b 14155: 61ace6b 14151: 27ae7e2 14143: f7dc0af v: v3
1 parent cbd731e commit fcf7fe7

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: ae8ea4a78b113f67ade93152dc3dee1ded81a219
5+
refs/heads/try: 0667fb4e6342a6a18320b464316ae7ba9c2bc192
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/src/rt/rust_internal.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,9 @@ static size_t const BUF_BYTES = 2048;
105105
void deref() { if (--ref_count == 0) { dtor; } }
106106

107107
#define RUST_ATOMIC_REFCOUNT() \
108-
public: \
108+
private: \
109109
intptr_t ref_count; \
110+
public: \
110111
void ref() { \
111112
intptr_t old = sync::increment(ref_count); \
112113
assert(old > 0); \

branches/try/src/rt/rust_kernel.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ rust_kernel::get_task_by_id(rust_task_id id) {
190190
task_table.get(id, &task);
191191
if(task) {
192192
if(task->get_ref_count() == 0) {
193+
// FIXME: I don't think this is possible.
193194
// this means the destructor is running, since the destructor
194195
// grabs the kernel lock to unregister the task. Pretend this
195196
// doesn't actually exist.

branches/try/src/rt/rust_task_thread.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ rust_task_thread::reap_dead_tasks() {
149149
void
150150
rust_task_thread::release_task(rust_task *task) {
151151
// Nobody should have a ref to the task at this point
152-
I(this, task->ref_count == 0);
152+
I(this, task->get_ref_count() == 0);
153153
// Kernel should not know about the task any more
154154
I(this, kernel->get_task_by_id(task->id) == NULL);
155155
// Now delete the task, which will require using this thread's

0 commit comments

Comments
 (0)