source: rtems/testsuites/sptests/sp71/init.c @ 3c8eda7

4.115
Last change on this file since 3c8eda7 was 3c8eda7, checked in by Joel Sherrill <joel.sherrill@…>, on 05/12/12 at 16:01:26

sptests - Eliminate missing prototype warnings

  • Property mode set to 100644
File size: 1.7 KB
Line 
1/*
2 *  COPYRIGHT (c) 1989-2012.
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
10#ifdef HAVE_CONFIG_H
11#include "config.h"
12#endif
13
14#include <tmacros.h>
15#include "test_support.h"
16
17#define PER_ALLOCATION 8000
18
19/* forward declarations to avoid warnings */
20rtems_task Init(rtems_task_argument argument);
21
22rtems_task Init(
23  rtems_task_argument argument
24)
25{
26  rtems_status_code status;
27  rtems_id          id;
28  long              created;
29
30  puts( "\n\n*** TEST 71 ***" );
31
32  created = 0;
33  do {
34    status = rtems_port_create(
35      rtems_build_name( 'P', 'O', 'R', 'T' ),
36      (void *) 0x1000,
37      (void *) 0x2000,
38      1024,
39      &id
40    );
41    if ( status == RTEMS_TOO_MANY )
42      break;
43    directive_failed( status, "rtems_task_create" );
44    created++;
45  } while (1);
46
47  printf(
48    "%ld ports created using %d per allocation -- need %ld\n",
49    created,
50    PER_ALLOCATION,
51    (long) OBJECTS_ID_FINAL_INDEX
52  );
53
54  if ( (created + PER_ALLOCATION) > OBJECTS_ID_FINAL_INDEX ) {
55    puts( "Test case hit" );
56    puts( "*** END OF TEST 71 ***" );
57  } else {
58    puts( "Test case NOT hit" );
59  }
60  rtems_test_exit(0);
61}
62
63/* configuration information */
64
65#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
66#define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER
67
68#define CONFIGURE_MAXIMUM_TASKS             1
69#define CONFIGURE_MAXIMUM_PORTS rtems_resource_unlimited(PER_ALLOCATION)
70#define CONFIGURE_UNIFIED_WORK_AREAS
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.