OSDN Git Service

New Language: Ada
[pf3gnuchains/gcc-fork.git] / gcc / ada / 5vosinte.ads
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 --                             $Revision: 1.17 $
10 --                                                                          --
11 --           Copyright (C) 1991-2001 Free Software Foundation, Inc.         --
12 --                                                                          --
13 -- GNARL is free software; you can  redistribute it  and/or modify it under --
14 -- terms of the  GNU General Public License as published  by the Free Soft- --
15 -- ware  Foundation;  either version 2,  or (at your option) any later ver- --
16 -- sion. GNARL is distributed in the hope that it will be useful, but WITH- --
17 -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
18 -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
19 -- for  more details.  You should have  received  a copy of the GNU General --
20 -- Public License  distributed with GNARL; see file COPYING.  If not, write --
21 -- to  the Free Software Foundation,  59 Temple Place - Suite 330,  Boston, --
22 -- MA 02111-1307, USA.                                                      --
23 --                                                                          --
24 -- As a special exception,  if other files  instantiate  generics from this --
25 -- unit, or you link  this unit with other files  to produce an executable, --
26 -- this  unit  does not  by itself cause  the resulting  executable  to  be --
27 -- covered  by the  GNU  General  Public  License.  This exception does not --
28 -- however invalidate  any other reasons why  the executable file  might be --
29 -- covered by the  GNU Public License.                                      --
30 --                                                                          --
31 -- GNARL was developed by the GNARL team at Florida State University. It is --
32 -- now maintained by Ada Core Technologies Inc. in cooperation with Florida --
33 -- State University (http://www.gnat.com).                                  --
34 --                                                                          --
35 ------------------------------------------------------------------------------
36
37 --  This is a OpenVMS/Alpha version of this package.
38
39 --  This package encapsulates all direct interfaces to OS services
40 --  that are needed by children of System.
41
42 --  PLEASE DO NOT add any with-clauses to this package
43 --  or remove the pragma Elaborate_Body.
44 --  It is designed to be a bottom-level (leaf) package.
45
46 with Interfaces.C;
47 package System.OS_Interface is
48    pragma Preelaborate;
49
50    pragma Linker_Options ("--for-linker=sys$library:pthread$rtl.exe");
51    --  Link in the DEC threads library.
52
53    --  pragma Linker_Options ("--for-linker=/threads_enable");
54    --  Enable upcalls and multiple kernel threads.
55
56    subtype int            is Interfaces.C.int;
57    subtype short          is Interfaces.C.short;
58    subtype long           is Interfaces.C.long;
59    subtype unsigned       is Interfaces.C.unsigned;
60    subtype unsigned_short is Interfaces.C.unsigned_short;
61    subtype unsigned_long  is Interfaces.C.unsigned_long;
62    subtype unsigned_char  is Interfaces.C.unsigned_char;
63    subtype plain_char     is Interfaces.C.plain_char;
64    subtype size_t         is Interfaces.C.size_t;
65
66    -----------------------------
67    -- Signals (Interrupt IDs) --
68    -----------------------------
69
70    --  Type signal has an arbitrary limit of 31
71
72    Max_Interrupt : constant := 31;
73    type Signal is new unsigned range 0 .. Max_Interrupt;
74    for Signal'Size use unsigned'Size;
75
76    type sigset_t is array (Signal) of Boolean;
77    pragma Pack (sigset_t);
78
79    --  Interrupt_Number_Type
80    --  Unsigned long integer denoting the number of an interrupt
81
82    subtype Interrupt_Number_Type is unsigned_long;
83
84    --  OpenVMS system services return values of type Cond_Value_Type.
85
86    subtype Cond_Value_Type is unsigned_long;
87    subtype Short_Cond_Value_Type is unsigned_short;
88
89    type IO_Status_Block_Type is record
90       Status   : Short_Cond_Value_Type;
91       Count    : unsigned_short;
92       Dev_Info : unsigned_long;
93    end record;
94
95    type AST_Handler is access procedure (Param : Address);
96    No_AST_Handler : constant AST_Handler := null;
97
98    CMB_M_READONLY  : constant := 16#00000001#;
99    CMB_M_WRITEONLY : constant := 16#00000002#;
100    AGN_M_READONLY  : constant := 16#00000001#;
101    AGN_M_WRITEONLY : constant := 16#00000002#;
102
103    IO_WRITEVBLK : constant := 48;  --  WRITE VIRTUAL BLOCK
104    IO_READVBLK  : constant := 49;  --  READ VIRTUAL BLOCK
105
106    ----------------
107    -- Sys_Assign --
108    ----------------
109    --
110    --  Assign I/O Channel
111    --
112    --  Status = returned status
113    --  Devnam = address  of  device  name  or  logical  name   string
114    --               descriptor
115    --  Chan   = address of word to receive channel number assigned
116    --  Acmode = access mode associated with channel
117    --  Mbxnam = address of mailbox logical name string descriptor, if
118    --               mailbox associated with device
119    --  Flags  = optional channel flags longword for specifying options
120    --           for the $ASSIGN operation
121    --
122
123    procedure Sys_Assign
124      (Status : out Cond_Value_Type;
125       Devnam : in String;
126       Chan   : out unsigned_short;
127       Acmode : in unsigned_short := 0;
128       Mbxnam : in String := String'Null_Parameter;
129       Flags  : in unsigned_long := 0);
130    pragma Interface (External, Sys_Assign);
131    pragma Import_Valued_Procedure
132      (Sys_Assign, "SYS$ASSIGN",
133       (Cond_Value_Type, String,         unsigned_short,
134        unsigned_short,  String,         unsigned_long),
135       (Value,           Descriptor (s), Reference,
136        Value,           Descriptor (s), Value),
137       Flags);
138
139    ----------------
140    -- Sys_Cantim --
141    ----------------
142    --
143    --  Cancel Timer
144    --
145    --  Status  = returned status
146    --  Reqidt  = ID of timer to be cancelled
147    --  Acmode  = Access mode
148    --
149    procedure Sys_Cantim
150      (Status : out Cond_Value_Type;
151       Reqidt : in Address;
152       Acmode : in unsigned);
153    pragma Interface (External, Sys_Cantim);
154    pragma Import_Valued_Procedure
155      (Sys_Cantim, "SYS$CANTIM",
156       (Cond_Value_Type, Address, unsigned),
157       (Value,           Value,   Value));
158
159    ----------------
160    -- Sys_Crembx --
161    ----------------
162    --
163    --  Create mailbox
164    --
165    --     Status  = returned status
166    --     Prmflg  = permanent flag
167    --     Chan    = channel
168    --     Maxmsg  = maximum message
169    --     Bufquo  = buufer quote
170    --     Promsk  = protection mast
171    --     Acmode  = access mode
172    --     Lognam  = logical name
173    --     Flags   = flags
174    --
175    procedure Sys_Crembx
176      (Status : out Cond_Value_Type;
177       Prmflg : in Boolean;
178       Chan   : out unsigned_short;
179       Maxmsg : in unsigned_long := 0;
180       Bufquo : in unsigned_long := 0;
181       Promsk : in unsigned_short := 0;
182       Acmode : in unsigned_short := 0;
183       Lognam : in String;
184       Flags  : in unsigned_long := 0);
185    pragma Interface (External, Sys_Crembx);
186    pragma Import_Valued_Procedure
187      (Sys_Crembx, "SYS$CREMBX",
188       (Cond_Value_Type, Boolean,        unsigned_short,
189        unsigned_long,   unsigned_long,  unsigned_short,
190        unsigned_short,  String,         unsigned_long),
191       (Value,           Value,          Reference,
192        Value,           Value,          Value,
193        Value,           Descriptor (s), Value));
194
195    -------------
196    -- Sys_QIO --
197    -------------
198    --
199    --    Queue I/O
200    --
201    --     Status = Returned status of call
202    --     EFN    = event flag to be set when I/O completes
203    --     Chan   = channel
204    --     Func   = function
205    --     Iosb   = I/O status block
206    --     Astadr = system trap to be generated when I/O completes
207    --     Astprm = AST parameter
208    --     P1-6   = optional parameters
209
210    procedure Sys_QIO
211      (Status : out Cond_Value_Type;
212       EFN    : in unsigned_long := 0;
213       Chan   : in unsigned_short;
214       Func   : in unsigned_long := 0;
215       Iosb   : out IO_Status_Block_Type;
216       Astadr : in AST_Handler := No_AST_Handler;
217       Astprm : in Address := Null_Address;
218       P1     : in  unsigned_long := 0;
219       P2     : in  unsigned_long := 0;
220       P3     : in  unsigned_long := 0;
221       P4     : in  unsigned_long := 0;
222       P5     : in  unsigned_long := 0;
223       P6     : in  unsigned_long := 0);
224
225    procedure Sys_QIO
226      (Status : out Cond_Value_Type;
227       EFN    : in unsigned_long := 0;
228       Chan   : in unsigned_short;
229       Func   : in unsigned_long := 0;
230       Iosb   : in Address := Null_Address;
231       Astadr : in AST_Handler := No_AST_Handler;
232       Astprm : in Address := Null_Address;
233       P1     : in  unsigned_long := 0;
234       P2     : in  unsigned_long := 0;
235       P3     : in  unsigned_long := 0;
236       P4     : in  unsigned_long := 0;
237       P5     : in  unsigned_long := 0;
238       P6     : in  unsigned_long := 0);
239
240    pragma Interface (External, Sys_QIO);
241    pragma Import_Valued_Procedure
242      (Sys_QIO, "SYS$QIO",
243       (Cond_Value_Type,      unsigned_long, unsigned_short, unsigned_long,
244        IO_Status_Block_Type, AST_Handler,   Address,
245        unsigned_long,        unsigned_long, unsigned_long,
246        unsigned_long,        unsigned_long, unsigned_long),
247       (Value,                Value,         Value,          Value,
248        Reference,            Value,         Value,
249        Value,                Value,         Value,
250        Value,                Value,         Value));
251
252    pragma Import_Valued_Procedure
253      (Sys_QIO, "SYS$QIO",
254       (Cond_Value_Type, unsigned_long, unsigned_short, unsigned_long,
255        Address,         AST_Handler,   Address,
256        unsigned_long,   unsigned_long, unsigned_long,
257        unsigned_long,   unsigned_long, unsigned_long),
258       (Value,           Value,         Value,          Value,
259        Value,           Value,         Value,
260        Value,           Value,         Value,
261        Value,           Value,         Value));
262
263    ----------------
264    -- Sys_Setimr --
265    ----------------
266    --
267    --    Set Timer
268    --
269    --     Status = Returned status of call
270    --     EFN    = event flag to be set when timer expires
271    --     Tim    = expiration time
272    --     AST    = system trap to be generated when timer expires
273    --     Redidt = returned ID of timer (e.g. to cancel timer)
274    --     Flags  = flags
275    --
276    procedure Sys_Setimr
277      (Status : out Cond_Value_Type;
278       EFN    : in unsigned_long;
279       Tim    : in Long_Integer;
280       AST    : in AST_Handler;
281       Reqidt : in Address;
282       Flags  : in unsigned_long);
283    pragma Interface (External, Sys_Setimr);
284    pragma Import_Valued_Procedure
285      (Sys_Setimr, "SYS$SETIMR",
286       (Cond_Value_Type, unsigned_long,     Long_Integer,
287        AST_Handler,     Address,           unsigned_long),
288       (Value,           Value,             Reference,
289        Value,           Value,             Value));
290
291    Interrupt_ID_0   : constant  := 0;
292    Interrupt_ID_1   : constant  := 1;
293    Interrupt_ID_2   : constant  := 2;
294    Interrupt_ID_3   : constant  := 3;
295    Interrupt_ID_4   : constant  := 4;
296    Interrupt_ID_5   : constant  := 5;
297    Interrupt_ID_6   : constant  := 6;
298    Interrupt_ID_7   : constant  := 7;
299    Interrupt_ID_8   : constant  := 8;
300    Interrupt_ID_9   : constant  := 9;
301    Interrupt_ID_10  : constant  := 10;
302    Interrupt_ID_11  : constant  := 11;
303    Interrupt_ID_12  : constant  := 12;
304    Interrupt_ID_13  : constant  := 13;
305    Interrupt_ID_14  : constant  := 14;
306    Interrupt_ID_15  : constant  := 15;
307    Interrupt_ID_16  : constant  := 16;
308    Interrupt_ID_17  : constant  := 17;
309    Interrupt_ID_18  : constant  := 18;
310    Interrupt_ID_19  : constant  := 19;
311    Interrupt_ID_20  : constant  := 20;
312    Interrupt_ID_21  : constant  := 21;
313    Interrupt_ID_22  : constant  := 22;
314    Interrupt_ID_23  : constant  := 23;
315    Interrupt_ID_24  : constant  := 24;
316    Interrupt_ID_25  : constant  := 25;
317    Interrupt_ID_26  : constant  := 26;
318    Interrupt_ID_27  : constant  := 27;
319    Interrupt_ID_28  : constant  := 28;
320    Interrupt_ID_29  : constant  := 29;
321    Interrupt_ID_30  : constant  := 30;
322    Interrupt_ID_31  : constant  := 31;
323
324    -----------
325    -- Errno --
326    -----------
327
328    function errno return int;
329    pragma Import (C, errno, "__get_errno");
330
331    EINTR  : constant := 4;   --  Interrupted system call
332    EAGAIN : constant := 11;  --  No more processes
333    ENOMEM : constant := 12;  --  Not enough core
334
335    -------------------------
336    -- Priority Scheduling --
337    -------------------------
338
339    SCHED_FIFO  : constant := 1;
340    SCHED_RR    : constant := 2;
341    SCHED_OTHER : constant := 3;
342    SCHED_BG    : constant := 4;
343    SCHED_LFI   : constant := 5;
344    SCHED_LRR   : constant := 6;
345
346    -------------
347    -- Process --
348    -------------
349
350    type pid_t is private;
351
352    function kill (pid : pid_t; sig : Signal) return int;
353    pragma Import (C, kill);
354
355    function getpid return pid_t;
356    pragma Import (C, getpid);
357
358    -------------
359    -- Threads --
360    -------------
361
362    type Thread_Body is access
363      function (arg : System.Address) return System.Address;
364    type pthread_t           is private;
365    subtype Thread_Id        is pthread_t;
366
367    type pthread_mutex_t     is limited private;
368    type pthread_cond_t      is limited private;
369    type pthread_attr_t      is limited private;
370    type pthread_mutexattr_t is limited private;
371    type pthread_condattr_t  is limited private;
372    type pthread_key_t       is private;
373
374    PTHREAD_CREATE_JOINABLE     : constant := 0;
375    PTHREAD_CREATE_DETACHED     : constant := 1;
376
377    PTHREAD_CANCEL_DISABLE      : constant := 0;
378    PTHREAD_CANCEL_ENABLE       : constant := 1;
379
380    PTHREAD_CANCEL_DEFERRED     : constant := 0;
381    PTHREAD_CANCEL_ASYNCHRONOUS : constant := 1;
382
383    --  Don't use ERRORCHECK mutexes, they don't work when a thread is not
384    --  the owner.  AST's, at least, unlock others threads mutexes. Even
385    --  if the error is ignored, they don't work.
386    PTHREAD_MUTEX_NORMAL_NP     : constant := 0;
387    PTHREAD_MUTEX_RECURSIVE_NP  : constant := 1;
388    PTHREAD_MUTEX_ERRORCHECK_NP : constant := 2;
389
390    PTHREAD_INHERIT_SCHED       : constant := 0;
391    PTHREAD_EXPLICIT_SCHED      : constant := 1;
392
393    function pthread_cancel (thread : pthread_t) return int;
394    pragma Import (C, pthread_cancel, "PTHREAD_CANCEL");
395
396    procedure pthread_testcancel;
397    pragma Import (C, pthread_testcancel, "PTHREAD_TESTCANCEL");
398
399    function pthread_setcancelstate
400      (newstate : int; oldstate : access int) return int;
401    pragma Import (C, pthread_setcancelstate, "PTHREAD_SETCANCELSTATE");
402
403    function pthread_setcanceltype
404      (newtype : int; oldtype : access int) return int;
405    pragma Import (C, pthread_setcanceltype, "PTHREAD_SETCANCELTYPE");
406
407    ---------------------------
408    --  POSIX.1c  Section 3  --
409    ---------------------------
410
411    function pthread_lock_global_np return int;
412    pragma Import (C, pthread_lock_global_np, "PTHREAD_LOCK_GLOBAL_NP");
413
414    function pthread_unlock_global_np return int;
415    pragma Import (C, pthread_unlock_global_np, "PTHREAD_UNLOCK_GLOBAL_NP");
416
417    ----------------------------
418    --  POSIX.1c  Section 11  --
419    ----------------------------
420
421    function pthread_mutexattr_init
422      (attr : access pthread_mutexattr_t) return int;
423    pragma Import (C, pthread_mutexattr_init, "PTHREAD_MUTEXATTR_INIT");
424
425    function pthread_mutexattr_destroy
426      (attr : access pthread_mutexattr_t) return int;
427    pragma Import (C, pthread_mutexattr_destroy, "PTHREAD_MUTEXATTR_DESTROY");
428
429    function pthread_mutexattr_settype_np
430      (attr      : access pthread_mutexattr_t;
431       mutextype : int) return int;
432    pragma Import (C, pthread_mutexattr_settype_np,
433                      "PTHREAD_MUTEXATTR_SETTYPE_NP");
434
435    function pthread_mutex_init
436      (mutex : access pthread_mutex_t;
437       attr  : access pthread_mutexattr_t) return int;
438    pragma Import (C, pthread_mutex_init, "PTHREAD_MUTEX_INIT");
439
440    function pthread_mutex_destroy (mutex : access pthread_mutex_t) return int;
441    pragma Import (C, pthread_mutex_destroy, "PTHREAD_MUTEX_DESTROY");
442
443    function pthread_mutex_lock (mutex : access pthread_mutex_t) return int;
444    pragma Import (C, pthread_mutex_lock, "PTHREAD_MUTEX_LOCK");
445
446    function pthread_mutex_unlock (mutex : access pthread_mutex_t) return int;
447    pragma Import (C, pthread_mutex_unlock, "PTHREAD_MUTEX_UNLOCK");
448
449    function pthread_condattr_init
450      (attr : access pthread_condattr_t) return int;
451    pragma Import (C, pthread_condattr_init, "PTHREAD_CONDATTR_INIT");
452
453    function pthread_condattr_destroy
454      (attr : access pthread_condattr_t) return int;
455    pragma Import (C, pthread_condattr_destroy, "PTHREAD_CONDATTR_DESTROY");
456
457    function pthread_cond_init
458      (cond : access pthread_cond_t;
459       attr : access pthread_condattr_t) return int;
460    pragma Import (C, pthread_cond_init, "PTHREAD_COND_INIT");
461
462    function pthread_cond_destroy (cond : access pthread_cond_t) return int;
463    pragma Import (C, pthread_cond_destroy, "PTHREAD_COND_DESTROY");
464
465    function pthread_cond_signal (cond : access pthread_cond_t) return int;
466    pragma Import (C, pthread_cond_signal, "PTHREAD_COND_SIGNAL");
467
468    function pthread_cond_signal_int_np
469      (cond : access pthread_cond_t) return int;
470    pragma Import (C, pthread_cond_signal_int_np,
471                   "PTHREAD_COND_SIGNAL_INT_NP");
472
473    function pthread_cond_wait
474      (cond  : access pthread_cond_t;
475       mutex : access pthread_mutex_t) return int;
476    pragma Import (C, pthread_cond_wait, "PTHREAD_COND_WAIT");
477
478    --------------------------
479    -- POSIX.1c  Section 13 --
480    --------------------------
481
482    function pthread_mutexattr_setprotocol
483      (attr : access pthread_mutexattr_t; protocol : int) return int;
484    pragma Import (C, pthread_mutexattr_setprotocol,
485                      "PTHREAD_MUTEXATTR_SETPROTOCOL");
486
487    type struct_sched_param is record
488       sched_priority : int;  --  scheduling priority
489    end record;
490    for struct_sched_param'Size use 8*4;
491    pragma Convention (C, struct_sched_param);
492
493    function pthread_setschedparam
494      (thread : pthread_t;
495       policy : int;
496       param  : access struct_sched_param) return int;
497    pragma Import (C, pthread_setschedparam, "PTHREAD_SETSCHEDPARAM");
498
499    function pthread_attr_setscope
500      (attr            : access pthread_attr_t;
501       contentionscope : int) return int;
502    pragma Import (C, pthread_attr_setscope, "PTHREAD_ATTR_SETSCOPE");
503
504    function pthread_attr_setinheritsched
505      (attr            : access pthread_attr_t;
506       inheritsched : int) return int;
507    pragma Import (C, pthread_attr_setinheritsched,
508                      "PTHREAD_ATTR_SETINHERITSCHED");
509
510    function pthread_attr_setschedpolicy
511      (attr : access pthread_attr_t; policy : int) return int;
512    pragma Import (C, pthread_attr_setschedpolicy,
513                      "PTHREAD_ATTR_SETSCHEDPOLICY");
514
515    function pthread_attr_setschedparam
516      (attr        : access pthread_attr_t;
517       sched_param : int) return int;
518    pragma Import (C, pthread_attr_setschedparam, "PTHREAD_ATTR_SETSCHEDPARAM");
519
520    function sched_yield return int;
521
522    -----------------------------
523    --  P1003.1c - Section 16  --
524    -----------------------------
525
526    function pthread_attr_init (attributes : access pthread_attr_t) return int;
527    pragma Import (C, pthread_attr_init, "PTHREAD_ATTR_INIT");
528
529    function pthread_attr_destroy
530      (attributes : access pthread_attr_t) return int;
531    pragma Import (C, pthread_attr_destroy, "PTHREAD_ATTR_DESTROY");
532
533    function pthread_attr_setdetachstate
534      (attr        : access pthread_attr_t;
535       detachstate : int) return int;
536    pragma Import (C, pthread_attr_setdetachstate,
537                      "PTHREAD_ATTR_SETDETACHSTATE");
538
539    function pthread_attr_setstacksize
540      (attr      : access pthread_attr_t;
541       stacksize : size_t) return int;
542    pragma Import (C, pthread_attr_setstacksize, "PTHREAD_ATTR_SETSTACKSIZE");
543
544    function pthread_create
545      (thread        : access pthread_t;
546       attributes    : access pthread_attr_t;
547       start_routine : Thread_Body;
548       arg           : System.Address) return int;
549    pragma Import (C, pthread_create, "PTHREAD_CREATE");
550
551    procedure pthread_exit (status : System.Address);
552    pragma Import (C, pthread_exit, "PTHREAD_EXIT");
553
554    function pthread_self return pthread_t;
555    pragma Import (C, pthread_self, "PTHREAD_SELF");
556
557    --------------------------
558    -- POSIX.1c  Section 17 --
559    --------------------------
560
561    function pthread_setspecific
562      (key   : pthread_key_t;
563       value : System.Address) return  int;
564    pragma Import (C, pthread_setspecific, "PTHREAD_SETSPECIFIC");
565
566    function pthread_getspecific (key : pthread_key_t) return System.Address;
567    pragma Import (C, pthread_getspecific, "PTHREAD_GETSPECIFIC");
568
569    type destructor_pointer is access procedure (arg : System.Address);
570
571    function pthread_key_create
572      (key        : access pthread_key_t;
573       destructor : destructor_pointer) return int;
574    pragma Import (C, pthread_key_create, "PTHREAD_KEY_CREATE");
575
576 private
577
578    type pid_t is new int;
579
580    type pthreadLongAddr_p is mod 2 ** Long_Integer'Size;
581
582    type pthreadLongAddr_t is mod 2 ** Long_Integer'Size;
583    type pthreadLongAddr_t_ptr is mod 2 ** Long_Integer'Size;
584
585    type pthreadLongString_t is mod 2 ** Long_Integer'Size;
586
587    type pthreadLongUint_t is mod 2 ** Long_Integer'Size;
588    type pthreadLongUint_array is array (Natural range <>)
589      of pthreadLongUint_t;
590
591    type pthread_t is mod 2 ** Long_Integer'Size;
592
593    type pthread_cond_t is record
594       state    : unsigned;
595       valid    : unsigned;
596       name     : pthreadLongString_t;
597       arg      : unsigned;
598       sequence : unsigned;
599       block    : pthreadLongAddr_t_ptr;
600    end record;
601    for pthread_cond_t'Size use 8*32;
602    pragma Convention (C, pthread_cond_t);
603
604    type pthread_attr_t is record
605       valid    : long;
606       name     : pthreadLongString_t;
607       arg      : pthreadLongUint_t;
608       reserved : pthreadLongUint_array (0 .. 18);
609    end record;
610    for pthread_attr_t'Size use 8*176;
611    pragma Convention (C, pthread_attr_t);
612
613    type pthread_mutex_t is record
614       lock     : unsigned;
615       valid    : unsigned;
616       name     : pthreadLongString_t;
617       arg      : unsigned;
618       sequence : unsigned;
619       block    : pthreadLongAddr_p;
620       owner    : unsigned;
621       depth    : unsigned;
622    end record;
623    for pthread_mutex_t'Size use 8*40;
624    pragma Convention (C, pthread_mutex_t);
625
626    type pthread_mutexattr_t is record
627       valid    : long;
628       reserved : pthreadLongUint_array (0 .. 14);
629    end record;
630    for pthread_mutexattr_t'Size use 8*128;
631    pragma Convention (C, pthread_mutexattr_t);
632
633    type pthread_condattr_t is record
634       valid    : long;
635       reserved : pthreadLongUint_array (0 .. 12);
636    end record;
637    for pthread_condattr_t'Size use 8*112;
638    pragma Convention (C, pthread_condattr_t);
639
640    type pthread_key_t is new unsigned;
641
642 end System.OS_Interface;