source: rtems/testsuites/ada/sptests/sp01/sp01.adb @ 48aa4b5d

5
Last change on this file since 48aa4b5d was fd5471b, checked in by Sebastian Huber <sebastian.huber@…>, on 12/01/17 at 21:37:06

ada: Check C and POSIX types

Update #3256.

  • Property mode set to 100644
File size: 4.5 KB
Line 
1--
2--  MAIN / BODY
3--
4--  DESCRIPTION:
5--
6--  This is the entry point for Test SP01 of the Single Processor Test Suite.
7--
8--  DEPENDENCIES:
9--
10-- 
11--
12--  COPYRIGHT (c) 1989-2011.
13--  On-Line Applications Research Corporation (OAR).
14--
15--  The license and distribution terms for this file may in
16--  the file LICENSE in this distribution or at
17--  http://www.rtems.org/license/LICENSE.
18--
19
20with RTEMS;
21with RTEMS.TASKS;
22with SPTEST;
23with TEST_SUPPORT;
24with TEXT_IO;
25with System.OS_Interface;
26
27procedure SP01 is
28  INIT_ID : RTEMS.ID;
29  STATUS  : RTEMS.STATUS_CODES;
30  obj_clockid_t : System.OS_Interface.clockid_t;
31  pragma Warnings (Off, obj_clockid_t);
32  obj_pid_t : System.OS_Interface.pid_t;
33  pragma Warnings (Off, obj_pid_t);
34  obj_pthread_attr_t : System.OS_Interface.pthread_attr_t;
35  pragma Warnings (Off, obj_pthread_attr_t);
36  obj_pthread_condattr_t : System.OS_Interface.pthread_condattr_t;
37  pragma Warnings (Off, obj_pthread_condattr_t);
38  obj_pthread_cond_t : System.OS_Interface.pthread_cond_t;
39  pragma Warnings (Off, obj_pthread_cond_t);
40  obj_pthread_key_t : System.OS_Interface.pthread_key_t;
41  pragma Warnings (Off, obj_pthread_key_t);
42  obj_pthread_mutexattr_t : System.OS_Interface.pthread_mutexattr_t;
43  pragma Warnings (Off, obj_pthread_mutexattr_t);
44  obj_pthread_mutex_t : System.OS_Interface.pthread_mutex_t;
45  pragma Warnings (Off, obj_pthread_mutex_t);
46  obj_pthread_rwlockattr_t : System.OS_Interface.pthread_rwlockattr_t;
47  pragma Warnings (Off, obj_pthread_rwlockattr_t);
48  obj_pthread_rwlock_t : System.OS_Interface.pthread_rwlock_t;
49  pragma Warnings (Off, obj_pthread_rwlock_t);
50  obj_pthread_t : System.OS_Interface.pthread_t;
51  pragma Warnings (Off, obj_pthread_t);
52  obj_rtems_id : System.OS_Interface.rtems_id;
53  pragma Warnings (Off, obj_rtems_id);
54  obj_sigset_t : System.OS_Interface.sigset_t;
55  pragma Warnings (Off, obj_sigset_t);
56  obj_stack_t : System.OS_Interface.stack_t;
57  pragma Warnings (Off, obj_stack_t);
58  obj_struct_sched_param : System.OS_Interface.struct_sched_param;
59  pragma Warnings (Off, obj_struct_sched_param);
60  obj_struct_sigaction : System.OS_Interface.struct_sigaction;
61  pragma Warnings (Off, obj_struct_sigaction);
62  obj_timespec : System.OS_Interface.timespec;
63  pragma Warnings (Off, obj_timespec);
64begin
65
66   TEXT_IO.NEW_LINE( 2 );
67   TEST_SUPPORT.ADA_TEST_BEGIN;
68
69   TEST_SUPPORT.Check_Type(
70      0,
71      obj_clockid_t'Size,
72      obj_clockid_t'Alignment
73   );
74   TEST_SUPPORT.Check_Type(
75      1,
76      obj_pid_t'Size,
77      obj_pid_t'Alignment
78   );
79   TEST_SUPPORT.Check_Type(
80      2,
81      obj_pthread_attr_t'Size,
82      obj_pthread_attr_t'Alignment
83   );
84   TEST_SUPPORT.Check_Type(
85      3,
86      obj_pthread_condattr_t'Size,
87      obj_pthread_condattr_t'Alignment
88   );
89   TEST_SUPPORT.Check_Type(
90      4,
91      obj_pthread_cond_t'Size,
92      obj_pthread_cond_t'Alignment
93   );
94   TEST_SUPPORT.Check_Type(
95      5,
96      obj_pthread_key_t'Size,
97      obj_pthread_key_t'Alignment
98   );
99   TEST_SUPPORT.Check_Type(
100      6,
101      obj_pthread_mutexattr_t'Size,
102      obj_pthread_mutexattr_t'Alignment
103   );
104   TEST_SUPPORT.Check_Type(
105      7,
106      obj_pthread_mutex_t'Size,
107      obj_pthread_mutex_t'Alignment
108   );
109   TEST_SUPPORT.Check_Type(
110      8,
111      obj_pthread_rwlockattr_t'Size,
112      obj_pthread_rwlockattr_t'Alignment
113   );
114   TEST_SUPPORT.Check_Type(
115      9,
116      obj_pthread_rwlock_t'Size,
117      obj_pthread_rwlock_t'Alignment
118   );
119   TEST_SUPPORT.Check_Type(
120      10,
121      obj_pthread_t'Size,
122      obj_pthread_t'Alignment
123   );
124   TEST_SUPPORT.Check_Type(
125      11,
126      obj_rtems_id'Size,
127      obj_rtems_id'Alignment
128   );
129   TEST_SUPPORT.Check_Type(
130      12,
131      obj_sigset_t'Size,
132      obj_sigset_t'Alignment
133   );
134   TEST_SUPPORT.Check_Type(
135      13,
136      obj_stack_t'Size,
137      obj_stack_t'Alignment
138   );
139   TEST_SUPPORT.Check_Type(
140      14,
141      obj_struct_sched_param'Size,
142      obj_struct_sched_param'Alignment
143   );
144   TEST_SUPPORT.Check_Type(
145      15,
146      obj_struct_sigaction'Size,
147      obj_struct_sigaction'Alignment
148   );
149   TEST_SUPPORT.Check_Type(
150      16,
151      obj_timespec'Size,
152      obj_timespec'Alignment
153   );
154
155   RTEMS.TASKS.CREATE(
156      RTEMS.BUILD_NAME(  'I', 'N', 'I', 'T' ),
157      1,
158      RTEMS.MINIMUM_STACK_SIZE,
159      RTEMS.NO_PREEMPT,
160      RTEMS.DEFAULT_ATTRIBUTES,
161      INIT_ID,
162      STATUS
163   );
164   TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_CREATE OF INIT" );
165
166
167   RTEMS.TASKS.START(
168      INIT_ID,
169      SPTEST.INIT'ACCESS,
170      0,
171      STATUS
172   );
173   TEST_SUPPORT.DIRECTIVE_FAILED( STATUS, "TASK_START OF INIT" );
174
175   loop
176      delay 120.0;
177   end loop;
178
179end SP01;
180
Note: See TracBrowser for help on using the repository browser.