diff options
Diffstat (limited to 'cpukit/libmisc/capture/record-userext.c')
-rw-r--r-- | cpukit/libmisc/capture/record-userext.c | 36 |
1 files changed, 10 insertions, 26 deletions
diff --git a/cpukit/libmisc/capture/record-userext.c b/cpukit/libmisc/capture/record-userext.c index 39f61eace8..3a91f64693 100644 --- a/cpukit/libmisc/capture/record-userext.c +++ b/cpukit/libmisc/capture/record-userext.c @@ -33,28 +33,20 @@ bool _Record_Thread_create( struct _Thread_Control *created ) { - rtems_record_context context_storage; - rtems_record_context *context; - Objects_Id id; - - context = rtems_record_prepare( &context_storage, 2 ); - context = rtems_record_add( - context, - RTEMS_RECORD_EVENT_THREAD_CREATED, - created->Object.id - ); + Objects_Id created_by; /* The idle threads are created without an executing thread */ if ( executing != NULL ) { - id = executing->Object.id; + created_by = executing->Object.id; } else { - id = 0; + created_by = 0; } - rtems_record_commit( - context, + rtems_record_produce_2( + RTEMS_RECORD_EVENT_THREAD_CREATED, + created->Object.id, RTEMS_RECORD_EVENT_THREAD_CREATED_BY, - id + created_by ); return true; @@ -65,17 +57,9 @@ void _Record_Thread_delete( struct _Thread_Control *deleted ) { - rtems_record_context context_storage; - rtems_record_context *context; - - context = rtems_record_prepare( &context_storage, 2 ); - context = rtems_record_add( - context, + rtems_record_produce_2( RTEMS_RECORD_EVENT_THREAD_DELETED, - deleted->Object.id - ); - rtems_record_commit( - context, + deleted->Object.id, RTEMS_RECORD_EVENT_THREAD_DELETED_BY, executing->Object.id ); @@ -89,7 +73,7 @@ void _Record_Thread_switch( rtems_record_context context_storage; rtems_record_context *context; - context = rtems_record_prepare( &context_storage, 3 ); + context = rtems_record_prepare( &context_storage ); context = rtems_record_add( context, RTEMS_RECORD_EVENT_THREAD_SWITCH_OUT, |