kernel: Do not require double parentheses in TRACE statements.

This commit is contained in:
Pawel Dziepak 2013-10-07 21:29:10 +02:00
parent 82c26e1f1f
commit 72f844835e

View File

@ -33,9 +33,9 @@
//#define TRACE_SCHEDULER //#define TRACE_SCHEDULER
#ifdef TRACE_SCHEDULER #ifdef TRACE_SCHEDULER
# define TRACE(x) dprintf_no_syslog x # define TRACE(x...) dprintf_no_syslog(x)
#else #else
# define TRACE(x) ; # define TRACE(x...) do { } while (false)
#endif #endif
@ -116,7 +116,7 @@ simple_increase_penalty(Thread *thread)
if (thread->priority >= B_FIRST_REAL_TIME_PRIORITY) if (thread->priority >= B_FIRST_REAL_TIME_PRIORITY)
return; return;
TRACE(("increasing thread %ld penalty\n", thread->id)); TRACE("increasing thread %ld penalty\n", thread->id);
scheduler_thread_data* schedulerThreadData scheduler_thread_data* schedulerThreadData
= reinterpret_cast<scheduler_thread_data*>(thread->scheduler_data); = reinterpret_cast<scheduler_thread_data*>(thread->scheduler_data);
@ -134,7 +134,7 @@ simple_cancel_penalty(Thread *thread)
scheduler_thread_data* schedulerThreadData scheduler_thread_data* schedulerThreadData
= reinterpret_cast<scheduler_thread_data*>(thread->scheduler_data); = reinterpret_cast<scheduler_thread_data*>(thread->scheduler_data);
if (schedulerThreadData->priority_penalty != 0) if (schedulerThreadData->priority_penalty != 0)
TRACE(("cancelling thread %ld penalty\n", thread->id)); TRACE("cancelling thread %ld penalty\n", thread->id);
schedulerThreadData->priority_penalty = 0; schedulerThreadData->priority_penalty = 0;
} }
@ -257,7 +257,7 @@ simple_reschedule(void)
} }
} }
TRACE(("reschedule(): current thread = %ld\n", oldThread->id)); TRACE("reschedule(): current thread = %ld\n", oldThread->id);
oldThread->state = oldThread->next_state; oldThread->state = oldThread->next_state;
scheduler_thread_data* schedulerOldThreadData scheduler_thread_data* schedulerOldThreadData
@ -270,18 +270,18 @@ simple_reschedule(void)
else if (!schedulerOldThreadData->lost_cpu) else if (!schedulerOldThreadData->lost_cpu)
simple_cancel_penalty(oldThread); simple_cancel_penalty(oldThread);
TRACE(("enqueueing thread %ld into run queue priority = %ld\n", TRACE("enqueueing thread %ld into run queue priority = %ld\n",
oldThread->id, simple_get_effective_priority(oldThread))); oldThread->id, simple_get_effective_priority(oldThread));
simple_enqueue_in_run_queue(oldThread); simple_enqueue_in_run_queue(oldThread);
break; break;
case B_THREAD_SUSPENDED: case B_THREAD_SUSPENDED:
TRACE(("reschedule(): suspending thread %ld\n", oldThread->id)); TRACE("reschedule(): suspending thread %ld\n", oldThread->id);
break; break;
case THREAD_STATE_FREE_ON_RESCHED: case THREAD_STATE_FREE_ON_RESCHED:
break; break;
default: default:
TRACE(("not enqueueing thread %ld into run queue next_state = %ld\n", TRACE("not enqueueing thread %ld into run queue next_state = %ld\n",
oldThread->id, oldThread->next_state)); oldThread->id, oldThread->next_state);
break; break;
} }