From: Subrata M. <su...@li...> - 2008-11-25 13:16:35
|
On Mon, 2008-11-24 at 10:46 +0530, Chirag Jog wrote: > This patch ensures that prio-preempt uses the librt debug mechanism. > > Tested: Running the test > ./prio_preempt > ./prio_preempt -v3 > ./run_auto > > Signed-Off-By: Chirag <ch...@li...> > > Acked-by: Darren Hart <dv...@us...> Applied. Regards-- Subrata > > Index: ltp/testcases/realtime/func/prio-preempt/prio-preempt.c > =================================================================== > --- ltp.orig/testcases/realtime/func/prio-preempt/prio-preempt.c > +++ ltp/testcases/realtime/func/prio-preempt/prio-preempt.c > @@ -188,7 +188,7 @@ void *worker_thread(void* arg) > rc = pthread_cond_wait(&cond[tid], &mutex[tid]); > rc = pthread_mutex_unlock(&mutex[tid]); > > - /* printf("%llu: Thread %d(%d) wakes up from sleep \n", rt_gettime(), tid, mypri); */ > + debug(DBG_INFO, "%llu: Thread %d(%d) wakes up from sleep \n", rt_gettime(), tid, mypri); > > /*check if we're the last thread */ > if (tid == NUM_WORKERS-1) { > @@ -202,13 +202,13 @@ void *worker_thread(void* arg) > /* Signal next thread */ > rc = pthread_mutex_lock(&mutex[tid+1]); > rc = pthread_cond_signal(&cond[tid+1]); > - /* printf("%llu: Thread %d(%d): Sent signal (%d) to (%d)\n", rt_gettime(), tid, mypri, > - rc, tid+1); */ > + debug(DBG_INFO, "%llu: Thread %d(%d): Sent signal (%d) to (%d)\n", rt_gettime(), tid, mypri, > + rc, tid+1); > > pstart = pend = rt_gettime(); > rc = pthread_mutex_unlock(&mutex[tid+1]); > > - /* printf("%llu: Thread %d(%d) setting it's bit \n",rt_gettime(), tid, mypri); */ > + debug(DBG_INFO, "%llu: Thread %d(%d) setting it's bit \n",rt_gettime(), tid, mypri); > > t_after_wait[tid] = 1; > > |