diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-09-16 15:43:15 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-09-16 15:43:15 +0200 |
commit | 7f8a978e6b078492bbc657a3731d324011274f2b (patch) | |
tree | c7710934a073c908f1d4fe3dee7ee4d898246129 /testsuites/sptests/sp07/tstart.c | |
parent | smptests/smpcache01: Remove invalidation of data cache lines from test (diff) | |
download | rtems-7f8a978e6b078492bbc657a3731d324011274f2b.tar.bz2 |
sptests/sp07: Minimize thread dispatch latency
Do not use sprintf() in thread dispatch critical sections to avoid
corruption of profiling samples. Update test to reflect thread the life
cycle changes.
Diffstat (limited to 'testsuites/sptests/sp07/tstart.c')
-rw-r--r-- | testsuites/sptests/sp07/tstart.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/testsuites/sptests/sp07/tstart.c b/testsuites/sptests/sp07/tstart.c index b6e8db8af8..c2f29cb2dd 100644 --- a/testsuites/sptests/sp07/tstart.c +++ b/testsuites/sptests/sp07/tstart.c @@ -27,23 +27,9 @@ void Task_start_extension( rtems_tcb *started_task ) { - char line[80]; - rtems_name name; + ssize_t task = task_number( started_task->Object.id ); - if ( task_number( started_task->Object.id ) > 0 ) { - name = Task_name[ task_number( started_task->Object.id ) ]; -/* - * FIXME: There should be a public function to - * convert numeric rtems_names into char arrays - * c.f. rtems_name_to_characters() in rtems/rtems/support.inl - * but it's private. - */ - sprintf( line, "TASK_START - %c%c%c%c - started\n", - (char)((name >> 24) & 0xff), - (char)((name >> 16) & 0xff), - (char)((name >> 8) & 0xff), - (char)(name & 0xff) - ); - buffered_io_add_string( line ); + if (task > 0) { + ++Task_started[ task ]; } } |