source: rtems/testsuites/smptests/smp05/init.c @ cf288c38

4.115
Last change on this file since cf288c38 was cf288c38, checked in by Jennifer Averett <Jennifer.Averett@…>, on Jul 29, 2011 at 12:29:34 PM

2011-07-29 Jennifer Averett <Jennifer.Averett@…>

  • smp01/init.c, smp02/init.c, smp02/tasks.c, smp03/init.c, smp03/tasks.c, smp04/Makefile.am, smp04/init.c, smp05/init.c, smp06/init.c, smp07/init.c, smp08/init.c: Cleaned up tests and fixed some print statement problems.
  • smp04/tasks.c: Removed.
  • Property mode set to 100644
File size: 1.7 KB
Line 
1/*
2 *  COPYRIGHT (c) 1989-2011.
3 *  On-Line Applications Research Corporation (OAR).
4 *
5 *  The license and distribution terms for this file may be
6 *  found in the file LICENSE in this distribution or at
7 *  http://www.rtems.com/license/LICENSE.
8 *
9 *  $Id$
10 */
11
12#include <tmacros.h>
13#include "test_support.h"
14
15rtems_task Test_task(
16  rtems_task_argument argument
17)
18{
19  locked_printf( "Shut down from CPU %d\n", bsp_smp_processor_id() );
20  locked_printf( "*** END OF TEST SMP05 ***\n" );
21  rtems_test_exit(0);
22}
23
24rtems_task Init(
25  rtems_task_argument argument
26)
27{
28  int                i;
29  char               ch;
30  int                cpu_num;
31  rtems_id           id;
32  rtems_status_code  status;
33
34  locked_print_initialize();
35  locked_printf( "\n\n*** TEST SMP05 ***\n" );
36
37  for ( i=0; i<rtems_smp_get_number_of_processors() ; i++ ) {
38    ch = '1' + i;
39
40    status = rtems_task_create(
41      rtems_build_name( 'T', 'A', ch, ' ' ),
42      1,
43      RTEMS_MINIMUM_STACK_SIZE,
44      RTEMS_DEFAULT_MODES,
45      RTEMS_DEFAULT_ATTRIBUTES,
46      &id
47    );
48    directive_failed( status, "task create" );
49
50    cpu_num = bsp_smp_processor_id();
51    locked_printf(" CPU %d start task TA%c\n", cpu_num, ch);
52
53    status = rtems_task_start( id, Test_task, i+1 );
54    directive_failed( status, "task start" );
55  }
56
57  while (1)
58    ;
59}
60
61/* configuration information */
62
63#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
64#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
65
66#define CONFIGURE_SMP_APPLICATION
67#define CONFIGURE_SMP_MAXIMUM_PROCESSORS   2
68
69#define CONFIGURE_MAXIMUM_TASKS            \
70    (1 + CONFIGURE_SMP_MAXIMUM_PROCESSORS)
71#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
72
73#define CONFIGURE_INIT
74
75#include <rtems/confdefs.h>
76/* end of file */
Note: See TracBrowser for help on using the repository browser.