forked from Imagelibrary/rtems
* smp03/init.c, smp03/system.h, smp03/tasks.c: Modified test to force a task to run prior to starting the next task. This allows the last task to always preempt, where if the tasks started in an odd order the last task could run prior the the task it was supposed to preempt.
34 lines
673 B
C
34 lines
673 B
C
/*
|
|
* COPYRIGHT (c) 1989-2011.
|
|
* On-Line Applications Research Corporation (OAR).
|
|
*
|
|
* The license and distribution terms for this file may be
|
|
* found in the file LICENSE in this distribution or at
|
|
* http://www.rtems.com/license/LICENSE.
|
|
*
|
|
* $Id$
|
|
*/
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
#include "config.h"
|
|
#endif
|
|
|
|
#include "system.h"
|
|
|
|
rtems_task Test_task(
|
|
rtems_task_argument task_index
|
|
)
|
|
{
|
|
char task_name[5];
|
|
|
|
/* Show that this task is running on cpu X */
|
|
sprintf( task_name, "TA%" PRIu32, task_index );
|
|
PrintTaskInfo( task_name );
|
|
|
|
TaskRan[task_index] = true;
|
|
|
|
/* Wait for the test to end without giving up this processor */
|
|
while(1)
|
|
;
|
|
}
|