RTEMS/Ada: Fix some POSIX types
authorSebastian Huber <sebastian.huber@embedded-brains.de>
Fri, 1 Dec 2017 11:00:52 +0000 (11:00 +0000)
committerSebastian Huber <sh@gcc.gnu.org>
Fri, 1 Dec 2017 11:00:52 +0000 (11:00 +0000)
gcc/ada
* libgnarl/s-osinte__rtems.ads (pthread_cond_t): Use correct size and
alignment.
(pthread_mutex_t): Likewise.
(pthread_rwlock_t): Likewise.

From-SVN: r255302

gcc/ada/ChangeLog
gcc/ada/libgnarl/s-osinte__rtems.ads

index 1b51bd631c4576a433666b9a6258d565f1ee5f06..319b095567c35454edebbea2ed8937cf83e889b8 100644 (file)
@@ -1,3 +1,10 @@
+2017-12-01  Sebastian Huber  <sebastian.huber@embedded-brains.de>
+
+       * libgnarl/s-osinte__rtems.ads (pthread_cond_t): Use correct size and
+       alignment.
+       (pthread_mutex_t): Likewise.
+       (pthread_rwlock_t): Likewise.
+
 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
 
        * gcc-interface/trans.c (Case_Statement_to_gnu): Build SWITCH_EXPR
index 43c0b774f61e488c4425ee796e1986d0c4d3f2c7..2068cb31710197963ff374dc4820d7d4b38aca69 100644 (file)
@@ -659,11 +659,23 @@ private
 
    type pthread_t is new rtems_id;
 
-   type pthread_mutex_t is new rtems_id;
+   type pthread_mutex_t is record
+      Data : char_array (1 .. OS_Constants.PTHREAD_MUTEX_SIZE);
+   end record;
+   pragma Convention (C, pthread_mutex_t);
+   for pthread_mutex_t'Alignment use Interfaces.C.double'Alignment;
 
-   type pthread_rwlock_t is new rtems_id;
+   type pthread_rwlock_t is record
+      Data : char_array (1 .. OS_Constants.PTHREAD_RWLOCK_SIZE);
+   end record;
+   pragma Convention (C, pthread_rwlock_t);
+   for pthread_rwlock_t'Alignment use Interfaces.C.double'Alignment;
 
-   type pthread_cond_t is new rtems_id;
+   type pthread_cond_t is record
+      Data : char_array (1 .. OS_Constants.PTHREAD_COND_SIZE);
+   end record;
+   pragma Convention (C, pthread_cond_t);
+   for pthread_cond_t'Alignment use Interfaces.C.double'Alignment;
 
    type pthread_key_t is new rtems_id;