diff packages/compat/uitron/current/include/uit_func.inl @ 66:bf00f99aec69 ecos-sw-2000-02-02

Merge from eCos master repository on 2000-02-02-19:16:44-GMT
author jlarmour
date Wed, 02 Feb 2000 19:57:02 +0000
parents c38311975d4f
children 435cced73e2f
line wrap: on
line diff
--- a/packages/compat/uitron/current/include/uit_func.inl
+++ b/packages/compat/uitron/current/include/uit_func.inl
@@ -11,11 +11,11 @@
 //                                                                          
 // -------------------------------------------                              
 // The contents of this file are subject to the Red Hat eCos Public License 
-// Version 1.0 (the "License"); you may not use this file except in         
+// Version 1.1 (the "License"); you may not use this file except in         
 // compliance with the License.  You may obtain a copy of the License at    
-// http://sourceware.cygnus.com/ecos                                        
+// http://www.redhat.com/                                                   
 //                                                                          
-// Software distributed under the License is distributed on an       
+// Software distributed under the License is distributed on an "AS IS"      
 // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.  See the 
 // License for the specific language governing rights and limitations under 
 // the License.                                                             
@@ -629,8 +629,9 @@ get_tid ( ID *p_tskid )
     Cyg_Thread *self = Cyg_Thread::self();
     CYG_UIT_PARAMCHECK_PTR( p_tskid );
     if ( (&cyg_uitron_TASKS[0] <= (self)) &&
-        ((self) < &cyg_uitron_TASKS[CYGNUM_UITRON_TASKS]) )
-        // then I am a uITRON task
+        ((self) < &cyg_uitron_TASKS[CYGNUM_UITRON_TASKS]) &&
+        (0 == Cyg_Scheduler::get_sched_lock()) )
+        // then I am a uITRON task and not in an interrupt or DSR
         *p_tskid = (self - (&cyg_uitron_TASKS[0])) + 1;
     else
         *p_tskid = 0; // Otherwise, non-task portion