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) { ...@@ -130,7 +130,7 @@ int set_butex_waiter(bthread_t tid, ButexWaiter* w) {
bool TaskGroup::wait_task(bthread_t* tid) { bool TaskGroup::wait_task(bthread_t* tid) {
do { do {
#ifdef BTHREAD_SAVE_PARKING_STATE #ifndef BTHREAD_DONT_SAVE_PARKING_STATE
if (_last_pl_state.stopped()) { if (_last_pl_state.stopped()) {
return -1; return -1;
} }
...@@ -162,7 +162,7 @@ void TaskGroup::run_main_task() { ...@@ -162,7 +162,7 @@ void TaskGroup::run_main_task() {
TaskGroup* dummy = this; TaskGroup* dummy = this;
bthread_t tid; bthread_t tid;
#ifdef BTHREAD_SAVE_PARKING_STATE #ifndef BTHREAD_DONT_SAVE_PARKING_STATE
_last_pl_state = _pl->get_state(); _last_pl_state = _pl->get_state();
#endif #endif
while (wait_task(&tid)) { while (wait_task(&tid)) {
......
...@@ -195,7 +195,7 @@ friend class TaskControl; ...@@ -195,7 +195,7 @@ friend class TaskControl;
if (_remote_rq.pop(tid)) { if (_remote_rq.pop(tid)) {
return true; return true;
} }
#ifdef BTHREAD_SAVE_PARKING_STATE #ifndef BTHREAD_DONT_SAVE_PARKING_STATE
_last_pl_state = _pl->get_state(); _last_pl_state = _pl->get_state();
#endif #endif
return _control->steal_task(tid, &_steal_seed, _steal_offset); return _control->steal_task(tid, &_steal_seed, _steal_offset);
...@@ -220,7 +220,7 @@ friend class TaskControl; ...@@ -220,7 +220,7 @@ friend class TaskControl;
void* _last_context_remained_arg; void* _last_context_remained_arg;
ParkingLot* _pl; ParkingLot* _pl;
#ifdef BTHREAD_SAVE_PARKING_STATE #ifndef BTHREAD_DONT_SAVE_PARKING_STATE
ParkingLot::State _last_pl_state; ParkingLot::State _last_pl_state;
#endif #endif
size_t _steal_seed; 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