source: rtems/testsuites/sptests/sp54/init.c @ 40be8f8

4.104.115
Last change on this file since 40be8f8 was 40be8f8, checked in by Joel Sherrill <joel.sherrill@…>, on Jun 12, 2009 at 5:33:12 PM

2009-06-12 Joel Sherrill <joel.sherrill@…>

  • sp54/init.c: Fix spacing.
  • Property mode set to 100644
File size: 1.9 KB
Line 
1/*  Odd Id Error Case -- Valid Id on API with No Objects Configured
2 *
3 *  COPYRIGHT (c) 1989-2009.
4 *  On-Line Applications Research Corporation (OAR).
5 *
6 *  The license and distribution terms for this file may be
7 *  found in the file LICENSE in this distribution or at
8 *  http://www.rtems.com/license/LICENSE.
9 *
10 *  $Id$
11 */
12
13#include <tmacros.h>
14
15rtems_task Init(
16  rtems_task_argument ignored
17)
18{
19  rtems_status_code    status;
20  rtems_task_priority  pri;
21  rtems_id             id;
22
23  puts( "\n\n*** TEST 54 ***" );
24
25  puts( "Init - use valid id of API class with no objects" );
26  status = rtems_task_set_priority( 0xa010001, RTEMS_CURRENT_PRIORITY, &pri );
27  fatal_directive_status(
28    status,
29    RTEMS_INVALID_ID,
30    "rtems_task_set_priority"
31  );
32
33  puts( "Init - lookup name within API class with no objects" );
34  status = rtems_task_ident( 0x123456, RTEMS_SEARCH_ALL_NODES, &id );
35  fatal_directive_status(
36    status,
37    RTEMS_INVALID_NAME,
38    "rtems_task_ident"
39  );
40
41  puts( "*** END OF TEST 54 ***" );
42  rtems_test_exit(0);
43}
44
45/* configuration information */
46
47#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
48#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
49
50/*
51 *  In this application, the initialization task performs the system
52 *  initialization and then transforms itself into the idle task.
53 */
54#define CONFIGURE_IDLE_TASK_BODY Init
55#define CONFIGURE_IDLE_TASK_INITIALIZES_APPLICATION
56
57/*
58 *  Another odd case to hit.  Since we use the Init task is Idle task
59 *  configuration, we can dummy up the initialization task configuration
60 *  to have a non-NULL pointer and 0 tasks.
61 */
62
63#define CONFIGURE_HAS_OWN_INIT_TASK_TABLE 1
64
65rtems_initialization_tasks_table Initialization_tasks[1] =
66{ { 0, }};
67
68#define CONFIGURE_INIT_TASK_TABLE      Initialization_tasks
69#define CONFIGURE_INIT_TASK_TABLE_SIZE 0
70#define CONFIGURE_INIT_TASK_STACK_SIZE 0
71
72#define CONFIGURE_INIT
73#include <rtems/confdefs.h>
74
75/* global variables */
Note: See TracBrowser for help on using the repository browser.