hppa: Fix LO_SUM DLTIND14R address support in PRINT_OPERAND_ADDRESS
[official-gcc.git] / gcc / ada / libgnarl / s-osinte__rtems.ads
blob6a7487c5db3d6e53e2cdca683e4078b8e6b6fd55
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS --
4 -- --
5 -- S Y S T E M . O S _ I N T E R F A C E --
6 -- --
7 -- S p e c --
8 -- --
9 -- Copyright (C) 1997-2024, Free Software Foundation, Inc. --
10 -- --
11 -- GNARL is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. --
17 -- --
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
19 -- additional permissions described in the GCC Runtime Library Exception, --
20 -- version 3.1, as published by the Free Software Foundation. --
21 -- --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
26 -- --
27 -- GNARL was developed by the GNARL team at Florida State University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
29 -- --
30 -- The GNARL files that were developed for RTEMS are maintained by On-Line --
31 -- Applications Research Corporation (http://www.oarcorp.com) in coopera- --
32 -- tion with Ada Core Technologies Inc. and Florida State University. --
33 -- --
34 ------------------------------------------------------------------------------
36 -- This is the RTEMS version of this package.
38 -- RTEMS target names are of the form CPU-rtems.
39 -- This implementation is designed to work on ALL RTEMS targets.
40 -- The RTEMS implementation is primarily based upon the POSIX threads
41 -- API but there are also bindings to GNAT/RTEMS support routines
42 -- to insulate this code from C API specific details and, in some
43 -- cases, obtain target architecture and BSP specific information
44 -- that is unavailable at the time this package is built.
46 -- This package encapsulates all direct interfaces to OS services
47 -- that are needed by children of System.
49 -- PLEASE DO NOT add any with-clauses to this package
50 -- or remove the pragma Preelaborate.
51 -- It is designed to be a bottom-level (leaf) package.
53 with Interfaces.C;
54 with System.OS_Constants;
55 with System.Parameters;
57 package System.OS_Interface is
58 pragma Preelaborate;
60 -- This interface assumes that "unsigned" is a 32-bit entity. This
61 -- will correspond to RTEMS object ids.
63 subtype rtems_id is Interfaces.C.unsigned;
65 subtype int is Interfaces.C.int;
66 subtype char is Interfaces.C.char;
67 subtype short is Interfaces.C.short;
68 subtype long is Interfaces.C.long;
69 subtype unsigned is Interfaces.C.unsigned;
70 subtype unsigned_short is Interfaces.C.unsigned_short;
71 subtype unsigned_long is Interfaces.C.unsigned_long;
72 subtype unsigned_char is Interfaces.C.unsigned_char;
73 subtype plain_char is Interfaces.C.plain_char;
74 subtype size_t is Interfaces.C.size_t;
75 -----------
76 -- Errno --
77 -----------
79 function errno return int;
80 pragma Import (C, errno, "__get_errno");
82 EAGAIN : constant := System.OS_Constants.EAGAIN;
83 EINTR : constant := System.OS_Constants.EINTR;
84 EINVAL : constant := System.OS_Constants.EINVAL;
85 ENOMEM : constant := System.OS_Constants.ENOMEM;
86 ETIMEDOUT : constant := System.OS_Constants.ETIMEDOUT;
88 ----------------------------
89 -- Signals and Interrupts --
90 ----------------------------
92 NSIG : constant := 64;
93 -- Number of signals on the target OS
94 type Signal is new int range 0 .. Interfaces.C."-" (NSIG, 1);
96 Max_HW_Interrupt : constant := 255;
97 type HW_Interrupt is new int range 0 .. Max_HW_Interrupt;
99 Max_Interrupt : constant := Max_HW_Interrupt;
100 subtype Interrupt_Range is Natural range 0 .. Max_HW_Interrupt;
101 -- For s-interr
103 SIGXCPU : constant := 0; -- XCPU
104 SIGHUP : constant := 1; -- hangup
105 SIGINT : constant := 2; -- interrupt (rubout)
106 SIGQUIT : constant := 3; -- quit (ASCD FS)
107 SIGILL : constant := 4; -- illegal instruction (not reset)
108 SIGTRAP : constant := 5; -- trace trap (not reset)
109 SIGIOT : constant := 6; -- IOT instruction
110 SIGABRT : constant := 6; -- used by abort, replace SIGIOT in the future
111 SIGEMT : constant := 7; -- EMT instruction
112 SIGFPE : constant := 8; -- floating point exception
113 SIGKILL : constant := 9; -- kill (cannot be caught or ignored)
114 SIGBUS : constant := 10; -- bus error
115 SIGSEGV : constant := 11; -- segmentation violation
116 SIGSYS : constant := 12; -- bad argument to system call
117 SIGPIPE : constant := 13; -- write on a pipe with no one to read it
118 SIGALRM : constant := 14; -- alarm clock
119 SIGTERM : constant := 15; -- software termination signal from kill
120 SIGUSR1 : constant := 16; -- user defined signal 1
121 SIGUSR2 : constant := 17; -- user defined signal 2
123 SIGADAABORT : constant := SIGABRT;
125 type Signal_Set is array (Natural range <>) of Signal;
127 Unmasked : constant Signal_Set := (SIGTRAP, SIGALRM, SIGEMT);
128 Reserved : constant Signal_Set := (1 .. 1 => SIGKILL);
130 type sigset_t is private;
132 function sigaddset (set : access sigset_t; sig : Signal) return int;
133 pragma Import (C, sigaddset, "sigaddset");
135 function sigdelset (set : access sigset_t; sig : Signal) return int;
136 pragma Import (C, sigdelset, "sigdelset");
138 function sigfillset (set : access sigset_t) return int;
139 pragma Import (C, sigfillset, "sigfillset");
141 function sigismember (set : access sigset_t; sig : Signal) return int;
142 pragma Import (C, sigismember, "sigismember");
144 function sigemptyset (set : access sigset_t) return int;
145 pragma Import (C, sigemptyset, "sigemptyset");
147 type struct_sigaction is record
148 sa_flags : int;
149 sa_mask : sigset_t;
150 sa_handler : System.Address;
151 end record;
152 pragma Convention (C, struct_sigaction);
153 type struct_sigaction_ptr is access all struct_sigaction;
155 SA_SIGINFO : constant := 16#02#;
157 SA_ONSTACK : constant := 16#00#;
158 -- SA_ONSTACK is not defined on RTEMS, but it is referred to in the POSIX
159 -- implementation of System.Interrupt_Management. Therefore we define a
160 -- dummy value of zero here so that setting this flag is a nop.
162 SIG_BLOCK : constant := 1;
163 SIG_UNBLOCK : constant := 2;
164 SIG_SETMASK : constant := 3;
166 SIG_DFL : constant := 0;
167 SIG_IGN : constant := 1;
169 function sigaction
170 (sig : Signal;
171 act : struct_sigaction_ptr;
172 oact : struct_sigaction_ptr) return int;
173 pragma Import (C, sigaction, "sigaction");
175 ----------
176 -- Time --
177 ----------
179 Time_Slice_Supported : constant Boolean := True;
180 -- Indicates whether time slicing is supported (i.e SCHED_RR is supported)
182 type timespec is private;
184 type clockid_t is new int;
186 CLOCK_REALTIME : constant clockid_t;
187 CLOCK_MONOTONIC : constant clockid_t;
189 function clock_gettime
190 (clock_id : clockid_t;
191 tp : access timespec) return int;
192 pragma Import (C, clock_gettime, "clock_gettime");
194 function clock_getres
195 (clock_id : clockid_t;
196 res : access timespec) return int;
197 pragma Import (C, clock_getres, "clock_getres");
199 function To_Duration (TS : timespec) return Duration;
200 pragma Inline (To_Duration);
202 function To_Timespec (D : Duration) return timespec;
203 pragma Inline (To_Timespec);
205 -------------------------
206 -- Priority Scheduling --
207 -------------------------
209 SCHED_FIFO : constant := 1;
210 SCHED_RR : constant := 2;
211 SCHED_OTHER : constant := 0;
213 function To_Target_Priority
214 (Prio : System.Any_Priority) return Interfaces.C.int;
215 -- Maps System.Any_Priority to a POSIX priority
217 -------------
218 -- Process --
219 -------------
221 type pid_t is private;
223 function kill (pid : pid_t; sig : Signal) return int;
224 pragma Import (C, kill, "kill");
226 function getpid return pid_t;
227 pragma Import (C, getpid, "getpid");
229 ---------
230 -- LWP --
231 ---------
233 function lwp_self return System.Address;
234 -- lwp_self does not exist on this thread library, revert to pthread_self
235 -- which is the closest approximation (with getpid). This function is
236 -- needed to share 7staprop.adb across POSIX-like targets.
237 pragma Import (C, lwp_self, "pthread_self");
239 -------------
240 -- Threads --
241 -------------
243 type Thread_Body is access
244 function (arg : System.Address) return System.Address;
245 pragma Convention (C, Thread_Body);
247 type pthread_t is private;
248 subtype Thread_Id is pthread_t;
250 type pthread_mutex_t is limited private;
251 type pthread_rwlock_t is limited private;
252 type pthread_cond_t is limited private;
253 type pthread_attr_t is limited private;
254 type pthread_mutexattr_t is limited private;
255 type pthread_rwlockattr_t is limited private;
256 type pthread_condattr_t is limited private;
257 type pthread_key_t is private;
259 No_Key : constant pthread_key_t;
261 PTHREAD_CREATE_DETACHED : constant := 0;
263 PTHREAD_SCOPE_PROCESS : constant := 0;
264 PTHREAD_SCOPE_SYSTEM : constant := 1;
266 -----------
267 -- Stack --
268 -----------
270 type stack_t is record
271 ss_sp : System.Address;
272 ss_flags : int;
273 ss_size : size_t;
274 end record;
275 pragma Convention (C, stack_t);
277 function sigaltstack
278 (ss : not null access stack_t;
279 oss : access stack_t) return int;
281 Alternate_Stack : aliased System.Address;
282 -- This is a dummy definition, never used (Alternate_Stack_Size is null)
284 Alternate_Stack_Size : constant := 0;
285 -- No alternate signal stack is used on this platform
287 Stack_Base_Available : constant Boolean := False;
288 -- Indicates whether the stack base is available on this target.
289 -- This allows us to share s-osinte.adb between all the FSU/RTEMS
290 -- run time.
291 -- Note that this value can only be true if pthread_t has a complete
292 -- definition that corresponds exactly to the C header files.
294 function Get_Stack_Base (thread : pthread_t) return Address;
295 pragma Inline (Get_Stack_Base);
296 -- returns the stack base of the specified thread.
297 -- Only call this function when Stack_Base_Available is True.
299 -- These two functions are only needed to share s-taprop.adb with
300 -- FSU threads.
302 function Get_Page_Size return int;
303 pragma Import (C, Get_Page_Size, "getpagesize");
304 -- Returns the size of a page
306 PROT_ON : constant := 0;
307 PROT_OFF : constant := 0;
309 function mprotect (addr : Address; len : size_t; prot : int) return int;
310 pragma Import (C, mprotect);
312 -----------------------------------------
313 -- Nonstandard Thread Initialization --
314 -----------------------------------------
316 procedure pthread_init;
317 -- FSU_THREADS requires pthread_init, which is nonstandard
318 -- and this should be invoked during the elaboration of s-taprop.adb
320 -- RTEMS does not require this so we provide an empty Ada body.
322 -------------------------
323 -- POSIX.1c Section 3 --
324 -------------------------
326 function sigwait
327 (set : access sigset_t;
328 sig : access Signal) return int;
329 pragma Import (C, sigwait, "sigwait");
331 function pthread_kill
332 (thread : pthread_t;
333 sig : Signal) return int;
334 pragma Import (C, pthread_kill, "pthread_kill");
336 function pthread_sigmask
337 (how : int;
338 set : access sigset_t;
339 oset : access sigset_t) return int;
340 pragma Import (C, pthread_sigmask, "pthread_sigmask");
342 ----------------------------
343 -- POSIX.1c Section 11 --
344 ----------------------------
346 function pthread_mutexattr_init
347 (attr : access pthread_mutexattr_t) return int;
348 pragma Import (C, pthread_mutexattr_init, "pthread_mutexattr_init");
350 function pthread_mutexattr_destroy
351 (attr : access pthread_mutexattr_t) return int;
352 pragma Import (C, pthread_mutexattr_destroy, "pthread_mutexattr_destroy");
354 function pthread_mutex_init
355 (mutex : access pthread_mutex_t;
356 attr : access pthread_mutexattr_t) return int;
357 pragma Import (C, pthread_mutex_init, "pthread_mutex_init");
359 function pthread_mutex_destroy (mutex : access pthread_mutex_t) return int;
360 pragma Import (C, pthread_mutex_destroy, "pthread_mutex_destroy");
362 function pthread_mutex_lock (mutex : access pthread_mutex_t) return int;
363 pragma Import (C, pthread_mutex_lock, "pthread_mutex_lock");
365 function pthread_mutex_unlock (mutex : access pthread_mutex_t) return int;
366 pragma Import (C, pthread_mutex_unlock, "pthread_mutex_unlock");
368 function pthread_rwlockattr_init
369 (attr : access pthread_rwlockattr_t) return int;
370 pragma Import (C, pthread_rwlockattr_init, "pthread_rwlockattr_init");
372 function pthread_rwlockattr_destroy
373 (attr : access pthread_rwlockattr_t) return int;
374 pragma Import (C, pthread_rwlockattr_destroy, "pthread_rwlockattr_destroy");
376 PTHREAD_RWLOCK_PREFER_READER_NP : constant := 0;
377 PTHREAD_RWLOCK_PREFER_WRITER_NP : constant := 1;
378 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP : constant := 2;
380 function pthread_rwlockattr_setkind_np
381 (attr : access pthread_rwlockattr_t;
382 pref : int) return int;
384 function pthread_rwlock_init
385 (mutex : access pthread_rwlock_t;
386 attr : access pthread_rwlockattr_t) return int;
387 pragma Import (C, pthread_rwlock_init, "pthread_rwlock_init");
389 function pthread_rwlock_destroy
390 (mutex : access pthread_rwlock_t) return int;
391 pragma Import (C, pthread_rwlock_destroy, "pthread_rwlock_destroy");
393 function pthread_rwlock_rdlock (mutex : access pthread_rwlock_t) return int;
394 pragma Import (C, pthread_rwlock_rdlock, "pthread_rwlock_rdlock");
396 function pthread_rwlock_wrlock (mutex : access pthread_rwlock_t) return int;
397 pragma Import (C, pthread_rwlock_wrlock, "pthread_rwlock_wrlock");
399 function pthread_rwlock_unlock (mutex : access pthread_rwlock_t) return int;
400 pragma Import (C, pthread_rwlock_unlock, "pthread_rwlock_unlock");
402 function pthread_condattr_init
403 (attr : access pthread_condattr_t) return int;
404 pragma Import (C, pthread_condattr_init, "pthread_condattr_init");
406 function pthread_condattr_destroy
407 (attr : access pthread_condattr_t) return int;
408 pragma Import (C, pthread_condattr_destroy, "pthread_condattr_destroy");
410 function pthread_cond_init
411 (cond : access pthread_cond_t;
412 attr : access pthread_condattr_t) return int;
413 pragma Import (C, pthread_cond_init, "pthread_cond_init");
415 function pthread_cond_destroy (cond : access pthread_cond_t) return int;
416 pragma Import (C, pthread_cond_destroy, "pthread_cond_destroy");
418 function pthread_cond_signal (cond : access pthread_cond_t) return int;
419 pragma Import (C, pthread_cond_signal, "pthread_cond_signal");
421 function pthread_cond_wait
422 (cond : access pthread_cond_t;
423 mutex : access pthread_mutex_t) return int;
424 pragma Import (C, pthread_cond_wait, "pthread_cond_wait");
426 function pthread_cond_timedwait
427 (cond : access pthread_cond_t;
428 mutex : access pthread_mutex_t;
429 abstime : access timespec) return int;
430 pragma Import (C, pthread_cond_timedwait, "pthread_cond_timedwait");
432 --------------------------
433 -- POSIX.1c Section 13 --
434 --------------------------
436 PTHREAD_PRIO_NONE : constant := 0;
437 PTHREAD_PRIO_PROTECT : constant := 2;
438 PTHREAD_PRIO_INHERIT : constant := 1;
440 function pthread_mutexattr_setprotocol
441 (attr : access pthread_mutexattr_t;
442 protocol : int) return int;
443 pragma Import (C, pthread_mutexattr_setprotocol);
445 function pthread_mutexattr_setprioceiling
446 (attr : access pthread_mutexattr_t;
447 prioceiling : int) return int;
448 pragma Import
449 (C, pthread_mutexattr_setprioceiling,
450 "pthread_mutexattr_setprioceiling");
452 type struct_sched_param is record
453 sched_priority : int;
454 ss_low_priority : int;
455 ss_replenish_period : timespec;
456 ss_initial_budget : timespec;
457 sched_ss_max_repl : int;
458 end record;
459 pragma Convention (C, struct_sched_param);
461 function pthread_setschedparam
462 (thread : pthread_t;
463 policy : int;
464 param : access struct_sched_param) return int;
465 pragma Import (C, pthread_setschedparam, "pthread_setschedparam");
467 function pthread_attr_setscope
468 (attr : access pthread_attr_t;
469 contentionscope : int) return int;
470 pragma Import (C, pthread_attr_setscope, "pthread_attr_setscope");
472 function pthread_attr_setinheritsched
473 (attr : access pthread_attr_t;
474 inheritsched : int) return int;
475 pragma Import (C, pthread_attr_setinheritsched);
477 function pthread_attr_setschedpolicy
478 (attr : access pthread_attr_t;
479 policy : int) return int;
480 pragma Import (C, pthread_attr_setschedpolicy);
482 function pthread_attr_setschedparam
483 (attr : access pthread_attr_t;
484 sched_param : int) return int;
485 pragma Import (C, pthread_attr_setschedparam);
487 function sched_yield return int;
488 pragma Import (C, sched_yield, "sched_yield");
490 ---------------------------
491 -- P1003.1c - Section 16 --
492 ---------------------------
494 function pthread_attr_init (attributes : access pthread_attr_t) return int;
495 pragma Import (C, pthread_attr_init, "pthread_attr_init");
497 function pthread_attr_destroy
498 (attributes : access pthread_attr_t) return int;
499 pragma Import (C, pthread_attr_destroy, "pthread_attr_destroy");
501 function pthread_attr_setdetachstate
502 (attr : access pthread_attr_t;
503 detachstate : int) return int;
504 pragma Import (C, pthread_attr_setdetachstate);
506 function pthread_attr_setstacksize
507 (attr : access pthread_attr_t;
508 stacksize : size_t) return int;
509 pragma Import (C, pthread_attr_setstacksize, "pthread_attr_setstacksize");
511 function pthread_create
512 (thread : access pthread_t;
513 attributes : access pthread_attr_t;
514 start_routine : Thread_Body;
515 arg : System.Address) return int;
516 pragma Import (C, pthread_create, "pthread_create");
518 procedure pthread_exit (status : System.Address);
519 pragma Import (C, pthread_exit, "pthread_exit");
521 function pthread_self return pthread_t;
522 pragma Import (C, pthread_self, "pthread_self");
524 --------------------------
525 -- POSIX.1c Section 17 --
526 --------------------------
528 function pthread_setspecific
529 (key : pthread_key_t;
530 value : System.Address) return int;
531 pragma Import (C, pthread_setspecific, "pthread_setspecific");
533 function pthread_getspecific (key : pthread_key_t) return System.Address;
534 pragma Import (C, pthread_getspecific, "pthread_getspecific");
536 type destructor_pointer is access procedure (arg : System.Address);
537 pragma Convention (C, destructor_pointer);
539 function pthread_key_create
540 (key : access pthread_key_t;
541 destructor : destructor_pointer) return int;
542 pragma Import (C, pthread_key_create, "pthread_key_create");
544 ------------------------------------------------------------
545 -- Binary Semaphore Wrapper to Support Interrupt Tasks --
546 ------------------------------------------------------------
548 type Binary_Semaphore_Id is new rtems_id;
550 function Binary_Semaphore_Create return Binary_Semaphore_Id;
551 pragma Inline (Binary_Semaphore_Create);
553 function Binary_Semaphore_Delete (ID : Binary_Semaphore_Id) return int;
554 pragma Inline (Binary_Semaphore_Delete);
556 function Binary_Semaphore_Obtain (ID : Binary_Semaphore_Id) return int;
557 pragma Inline (Binary_Semaphore_Obtain);
559 function Binary_Semaphore_Release (ID : Binary_Semaphore_Id) return int;
560 pragma Inline (Binary_Semaphore_Release);
562 function Binary_Semaphore_Flush (ID : Binary_Semaphore_Id) return int;
563 pragma Inline (Binary_Semaphore_Flush);
565 ------------------------------------------------------------
566 -- Hardware Interrupt Wrappers to Support Interrupt Tasks --
567 ------------------------------------------------------------
569 type Interrupt_Handler is access procedure (parameter : System.Address);
570 pragma Convention (C, Interrupt_Handler);
572 type Interrupt_Vector is new System.Address;
574 function Interrupt_Connect
575 (Vector : Interrupt_Vector;
576 Handler : Interrupt_Handler;
577 Parameter : System.Address := System.Null_Address) return int;
578 -- Use this to set up an user handler. The routine installs a
579 -- a user handler which is invoked after RTEMS has saved enough
580 -- context for a high-level language routine to be safely invoked.
582 function Interrupt_Number_To_Vector (intNum : int) return Interrupt_Vector;
583 -- Convert a logical interrupt number to the hardware interrupt vector
584 -- number used to connect the interrupt.
586 private
588 type sigset_t is new unsigned_long;
590 type pid_t is new int;
592 type time_t is range -2 ** (System.Parameters.time_t_bits - 1)
593 .. 2 ** (System.Parameters.time_t_bits - 1) - 1;
595 type timespec is record
596 tv_sec : time_t;
597 tv_nsec : long;
598 end record;
599 pragma Convention (C, timespec);
601 CLOCK_REALTIME : constant clockid_t := System.OS_Constants.CLOCK_REALTIME;
602 CLOCK_MONOTONIC : constant clockid_t := System.OS_Constants.CLOCK_MONOTONIC;
604 subtype char_array is Interfaces.C.char_array;
606 type pthread_attr_t is record
607 Data : char_array (1 .. OS_Constants.PTHREAD_ATTR_SIZE);
608 end record;
609 pragma Convention (C, pthread_attr_t);
610 for pthread_attr_t'Alignment use Interfaces.C.double'Alignment;
612 type pthread_condattr_t is record
613 Data : char_array (1 .. OS_Constants.PTHREAD_CONDATTR_SIZE);
614 end record;
615 pragma Convention (C, pthread_condattr_t);
616 for pthread_condattr_t'Alignment use Interfaces.C.double'Alignment;
618 type pthread_mutexattr_t is record
619 Data : char_array (1 .. OS_Constants.PTHREAD_MUTEXATTR_SIZE);
620 end record;
621 pragma Convention (C, pthread_mutexattr_t);
622 for pthread_mutexattr_t'Alignment use Interfaces.C.int'Alignment;
624 type pthread_rwlockattr_t is record
625 Data : char_array (1 .. OS_Constants.PTHREAD_RWLOCKATTR_SIZE);
626 end record;
627 pragma Convention (C, pthread_rwlockattr_t);
628 for pthread_rwlockattr_t'Alignment use Interfaces.C.int'Alignment;
630 type pthread_t is new rtems_id;
632 type pthread_mutex_t is record
633 Data : char_array (1 .. OS_Constants.PTHREAD_MUTEX_SIZE);
634 end record;
635 pragma Convention (C, pthread_mutex_t);
636 for pthread_mutex_t'Alignment use Interfaces.C.double'Alignment;
638 type pthread_rwlock_t is record
639 Data : char_array (1 .. OS_Constants.PTHREAD_RWLOCK_SIZE);
640 end record;
641 pragma Convention (C, pthread_rwlock_t);
642 for pthread_rwlock_t'Alignment use Interfaces.C.size_t'Alignment;
644 type pthread_cond_t is record
645 Data : char_array (1 .. OS_Constants.PTHREAD_COND_SIZE);
646 end record;
647 pragma Convention (C, pthread_cond_t);
648 for pthread_cond_t'Alignment use Interfaces.C.size_t'Alignment;
650 type pthread_key_t is new rtems_id;
652 No_Key : constant pthread_key_t := 0;
654 end System.OS_Interface;