1 | /* |
---|
2 | * COPYRIGHT (c) 1989-2010. |
---|
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 | rtems_task Init( |
---|
20 | rtems_task_argument argument |
---|
21 | ) |
---|
22 | { |
---|
23 | rtems_status_code status; |
---|
24 | rtems_id id; |
---|
25 | long created; |
---|
26 | |
---|
27 | puts( "\n\n*** TEST 71 ***" ); |
---|
28 | |
---|
29 | created = 0; |
---|
30 | do { |
---|
31 | status = rtems_port_create( |
---|
32 | rtems_build_name( 'P', 'O', 'R', 'T' ), |
---|
33 | (void *) 0x1000, |
---|
34 | (void *) 0x2000, |
---|
35 | 1024, |
---|
36 | &id |
---|
37 | ); |
---|
38 | if ( status == RTEMS_TOO_MANY ) |
---|
39 | break; |
---|
40 | directive_failed( status, "rtems_task_create" ); |
---|
41 | created++; |
---|
42 | } while (1); |
---|
43 | |
---|
44 | printf( |
---|
45 | "%ld ports created using %d per allocation -- need %ld\n", |
---|
46 | created, |
---|
47 | PER_ALLOCATION, |
---|
48 | (long) OBJECTS_ID_FINAL_INDEX |
---|
49 | ); |
---|
50 | |
---|
51 | if ( (created + PER_ALLOCATION) > OBJECTS_ID_FINAL_INDEX ) { |
---|
52 | puts( "Test case hit" ); |
---|
53 | puts( "*** END OF TEST 71 ***" ); |
---|
54 | } else { |
---|
55 | puts( "Test case NOT hit" ); |
---|
56 | } |
---|
57 | rtems_test_exit(0); |
---|
58 | } |
---|
59 | |
---|
60 | /* configuration information */ |
---|
61 | |
---|
62 | #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER |
---|
63 | #define CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER |
---|
64 | |
---|
65 | #define CONFIGURE_MAXIMUM_TASKS 1 |
---|
66 | #define CONFIGURE_MAXIMUM_PORTS rtems_resource_unlimited(PER_ALLOCATION) |
---|
67 | #define CONFIGURE_UNIFIED_WORK_AREAS |
---|
68 | #define CONFIGURE_RTEMS_INIT_TASKS_TABLE |
---|
69 | |
---|
70 | #define CONFIGURE_INIT |
---|
71 | |
---|
72 | #include <rtems/confdefs.h> |
---|
73 | /* end of file */ |
---|