smp: Use Thread_Control.is_executing

FIXME: This area needs proper locking.
This commit is contained in:
Sebastian Huber
2013-07-26 14:04:22 +02:00
parent 45ca51c4f7
commit ff63d2dbf9

View File

@@ -41,14 +41,11 @@
return true; return true;
} }
#else #else
int cpu; /* FIXME: Locking */
for ( cpu=0 ; cpu < rtems_smp_get_processor_count() ; cpu++ ) { if ( the_thread->is_executing ) {
Per_CPU_Control *p = &_Per_CPU_Information[cpu]; *time_of_context_switch = the_thread->cpu->time_of_last_context_switch;
if ( p->executing->Object.id == the_thread->Object.id ) {
*time_of_context_switch = p->time_of_last_context_switch;
return true; return true;
} }
}
#endif #endif
return false; return false;
} }