Skip to content
Snippets Groups Projects
Commit d547fdaf authored by Pedro Gonnet's avatar Pedro Gonnet
Browse files

added qlock timer.

parent 22186ed1
No related branches found
No related tags found
No related merge requests found
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
/** Timer names. */ /** Timer names. */
char *qsched_timer_names[ qsched_timer_count ] = char *qsched_timer_names[ qsched_timer_count ] =
{ "queue" , "lock" , "gettask" , "done" , "prepare" }; { "queue" , "qlock" , "lock" , "gettask" , "done" , "prepare" };
/** /**
......
...@@ -54,6 +54,7 @@ typedef void (*qsched_funtype)( int , void * ); ...@@ -54,6 +54,7 @@ typedef void (*qsched_funtype)( int , void * );
/** Timer types. */ /** Timer types. */
enum qsched_timer { enum qsched_timer {
qsched_timer_queue = 0, qsched_timer_queue = 0,
qsched_timer_qlock,
qsched_timer_lock, qsched_timer_lock,
qsched_timer_gettask, qsched_timer_gettask,
qsched_timer_done, qsched_timer_done,
......
...@@ -54,8 +54,10 @@ int queue_get ( struct queue *q , struct qsched *s ) { ...@@ -54,8 +54,10 @@ int queue_get ( struct queue *q , struct qsched *s ) {
return -1; return -1;
/* Lock this queue. */ /* Lock this queue. */
TIMER_TIC
if ( lock_lock( &q->lock ) != 0 ) if ( lock_lock( &q->lock ) != 0 )
error( "Failed to lock queue." ); error( "Failed to lock queue." );
TIMER_TOC( s , qsched_timer_qlock );
/* Get a pointer to the indices. */ /* Get a pointer to the indices. */
inds = q->inds; inds = q->inds;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment