[rtems-schedsim commit] lookup_task.c: Fix bug where only first four chars of name mattered
Joel Sherrill
joel at rtems.org
Thu May 22 21:09:41 UTC 2014
Module: rtems-schedsim
Branch: master
Commit: ff91f4e0b5a26e19932cbc61491f68f094a17685
Changeset: http://git.rtems.org/rtems-schedsim/commit/?id=ff91f4e0b5a26e19932cbc61491f68f094a17685
Author: Joel Sherrill <joel.sherrill at oarcorp.com>
Date: Thu May 22 16:17:25 2014 -0500
lookup_task.c: Fix bug where only first four chars of name mattered
---
schedsim/shell/shared/lookup_task.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/schedsim/shell/shared/lookup_task.c b/schedsim/shell/shared/lookup_task.c
index 79d5717..e70eb4d 100644
--- a/schedsim/shell/shared/lookup_task.c
+++ b/schedsim/shell/shared/lookup_task.c
@@ -23,6 +23,7 @@
#endif
#ifndef RTEMS_IDENT_NAME
#define RTEMS_IDENT_NAME rtems_task_ident
+ #define DOING_TASKS
#endif
int METHOD_NAME(
@@ -35,9 +36,14 @@ int METHOD_NAME(
unsigned long tmp;
if ( string[0] != '0' ) {
- if ( !strcmp( string, "SELF" ) ) {
- *id = _Thread_Executing->Object.id;
- return 0;
+ #ifdef DOING_TASKS
+ if ( !strcmp( string, "SELF" ) ) {
+ *id = _Thread_Executing->Object.id;
+ return 0;
+ }
+ #endif
+ if ( strlen( string ) != 4 ) {
+ return -1;
}
memset( name, '\0', sizeof(name) );
strncpy( name, string, 4 );
More information about the vc
mailing list