summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--schedsim/shell/shared/lookup_task.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/schedsim/shell/shared/lookup_task.c b/schedsim/shell/shared/lookup_task.c
index e70eb4d..57740be 100644
--- a/schedsim/shell/shared/lookup_task.c
+++ b/schedsim/shell/shared/lookup_task.c
@@ -38,7 +38,9 @@ int METHOD_NAME(
if ( string[0] != '0' ) {
#ifdef DOING_TASKS
if ( !strcmp( string, "SELF" ) ) {
- *id = _Thread_Executing->Object.id;
+ _Thread_Disable_dispatch();
+ *id = _Thread_Executing->Object.id;
+ _Thread_Enable_dispatch();
return 0;
}
#endif