File tree Expand file tree Collapse file tree 4 files changed +5
-3
lines changed Expand file tree Collapse file tree 4 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 2
2
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5
- refs/heads/try: ae8ea4a78b113f67ade93152dc3dee1ded81a219
5
+ refs/heads/try: 0667fb4e6342a6a18320b464316ae7ba9c2bc192
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
Original file line number Diff line number Diff line change @@ -105,8 +105,9 @@ static size_t const BUF_BYTES = 2048;
105
105
void deref () { if (--ref_count == 0 ) { dtor; } }
106
106
107
107
#define RUST_ATOMIC_REFCOUNT () \
108
- public: \
108
+ private: \
109
109
intptr_t ref_count; \
110
+ public: \
110
111
void ref () { \
111
112
intptr_t old = sync::increment (ref_count); \
112
113
assert (old > 0 ); \
Original file line number Diff line number Diff line change @@ -190,6 +190,7 @@ rust_kernel::get_task_by_id(rust_task_id id) {
190
190
task_table.get (id, &task);
191
191
if (task) {
192
192
if (task->get_ref_count () == 0 ) {
193
+ // FIXME: I don't think this is possible.
193
194
// this means the destructor is running, since the destructor
194
195
// grabs the kernel lock to unregister the task. Pretend this
195
196
// doesn't actually exist.
Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ rust_task_thread::reap_dead_tasks() {
149
149
void
150
150
rust_task_thread::release_task (rust_task *task) {
151
151
// 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 );
153
153
// Kernel should not know about the task any more
154
154
I (this , kernel->get_task_by_id (task->id ) == NULL );
155
155
// Now delete the task, which will require using this thread's
You can’t perform that action at this time.
0 commit comments