forked from Imagelibrary/rtems
smp: Use Thread_Control.is_executing
FIXME: This area needs proper locking.
This commit is contained in:
@@ -41,13 +41,10 @@
|
|||||||
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 ) {
|
return true;
|
||||||
*time_of_context_switch = p->time_of_last_context_switch;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user