Commit 18124bb7 authored by gejun's avatar gejun

Patch svn r35069

Change-Id: Ib7567ed6c9ebb76c6d17a1e5dac6dd343a54cdeb
parent ad903bbb
......@@ -130,7 +130,7 @@ int set_butex_waiter(bthread_t tid, ButexWaiter* w) {
bool TaskGroup::wait_task(bthread_t* tid) {
do {
#ifdef BTHREAD_SAVE_PARKING_STATE
#ifndef BTHREAD_DONT_SAVE_PARKING_STATE
if (_last_pl_state.stopped()) {
return -1;
}
......@@ -162,7 +162,7 @@ void TaskGroup::run_main_task() {
TaskGroup* dummy = this;
bthread_t tid;
#ifdef BTHREAD_SAVE_PARKING_STATE
#ifndef BTHREAD_DONT_SAVE_PARKING_STATE
_last_pl_state = _pl->get_state();
#endif
while (wait_task(&tid)) {
......
......@@ -195,7 +195,7 @@ friend class TaskControl;
if (_remote_rq.pop(tid)) {
return true;
}
#ifdef BTHREAD_SAVE_PARKING_STATE
#ifndef BTHREAD_DONT_SAVE_PARKING_STATE
_last_pl_state = _pl->get_state();
#endif
return _control->steal_task(tid, &_steal_seed, _steal_offset);
......@@ -220,7 +220,7 @@ friend class TaskControl;
void* _last_context_remained_arg;
ParkingLot* _pl;
#ifdef BTHREAD_SAVE_PARKING_STATE
#ifndef BTHREAD_DONT_SAVE_PARKING_STATE
ParkingLot::State _last_pl_state;
#endif
size_t _steal_seed;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment