diff options
author | Joel Sherrill <joel.sherrill@oarcorp.com> | 2014-05-23 10:57:07 -0500 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@oarcorp.com> | 2014-05-23 13:22:48 -0500 |
commit | a6a8e11e37186b451a5a539205554664f369eb86 (patch) | |
tree | da9d9e8133bf77aec411adb0fcc8ea80066767f5 | |
parent | 6425eb90cf4a89db77377b5b470839b82c00cd51 (diff) |
lookup_task.c: Lock around getting executing id.
-rw-r--r-- | schedsim/shell/shared/lookup_task.c | 4 |
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 |