From: Sebastian Huber Date: Fri, 1 Dec 2017 11:00:52 +0000 (+0000) Subject: RTEMS/Ada: Fix some POSIX types X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b7d4abef36e8c462f52b081d8b0f8e05d76fdf68;p=gcc.git RTEMS/Ada: Fix some POSIX types 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 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 1b51bd631c4..319b095567c 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,10 @@ +2017-12-01 Sebastian Huber + + * 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 * gcc-interface/trans.c (Case_Statement_to_gnu): Build SWITCH_EXPR diff --git a/gcc/ada/libgnarl/s-osinte__rtems.ads b/gcc/ada/libgnarl/s-osinte__rtems.ads index 43c0b774f61..2068cb31710 100644 --- a/gcc/ada/libgnarl/s-osinte__rtems.ads +++ b/gcc/ada/libgnarl/s-osinte__rtems.ads @@ -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;