diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc_r/uthread/pthread_private.h | 6 | ||||
-rw-r--r-- | lib/libc_r/uthread/uthread_create.c | 2 | ||||
-rw-r--r-- | lib/libpthread/uthread/pthread_private.h | 6 | ||||
-rw-r--r-- | lib/libpthread/uthread/uthread_create.c | 2 |
4 files changed, 16 insertions, 0 deletions
diff --git a/lib/libc_r/uthread/pthread_private.h b/lib/libc_r/uthread/pthread_private.h index 96d53c36d4e..d562003026a 100644 --- a/lib/libc_r/uthread/pthread_private.h +++ b/lib/libc_r/uthread/pthread_private.h @@ -383,6 +383,12 @@ struct pthread { long slice_usec; /* + * Cumulative times spent in thread + */ + struct timeval ru_utime; + struct timeval ru_stime; + + /* * Incremental priority accumulated by thread while it is ready to * run but is denied being run. */ diff --git a/lib/libc_r/uthread/uthread_create.c b/lib/libc_r/uthread/uthread_create.c index ce70db0b3d4..4ce34434f3e 100644 --- a/lib/libc_r/uthread/uthread_create.c +++ b/lib/libc_r/uthread/uthread_create.c @@ -88,6 +88,8 @@ pthread_create(pthread_t * thread, const pthread_attr_t * attr, new_thread->stack = stack; new_thread->start_routine = start_routine; new_thread->arg = arg; + timerclear(&new_thread->ru_utime); + timerclear(&new_thread->ru_stime); /* * Write a magic value to the thread structure diff --git a/lib/libpthread/uthread/pthread_private.h b/lib/libpthread/uthread/pthread_private.h index 96d53c36d4e..d562003026a 100644 --- a/lib/libpthread/uthread/pthread_private.h +++ b/lib/libpthread/uthread/pthread_private.h @@ -383,6 +383,12 @@ struct pthread { long slice_usec; /* + * Cumulative times spent in thread + */ + struct timeval ru_utime; + struct timeval ru_stime; + + /* * Incremental priority accumulated by thread while it is ready to * run but is denied being run. */ diff --git a/lib/libpthread/uthread/uthread_create.c b/lib/libpthread/uthread/uthread_create.c index ce70db0b3d4..4ce34434f3e 100644 --- a/lib/libpthread/uthread/uthread_create.c +++ b/lib/libpthread/uthread/uthread_create.c @@ -88,6 +88,8 @@ pthread_create(pthread_t * thread, const pthread_attr_t * attr, new_thread->stack = stack; new_thread->start_routine = start_routine; new_thread->arg = arg; + timerclear(&new_thread->ru_utime); + timerclear(&new_thread->ru_stime); /* * Write a magic value to the thread structure |