From 2097a8906f26415d7ad36f485ad7841ed5142fba Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Sun, 6 Dec 2015 15:28:16 +0000 Subject: [PATCH] re PR ada/56274 (libada bootstrap failure on kfreebsd ("pthread_rwlock_t" not declared in "OS_Interface")) PR ada/56274 * s-osinte-kfreebsd-gnu.ads (pthread_rwlock_t): New subtype. (pthread_rwlockattr_t): Likewise. From-SVN: r231337 --- gcc/ada/ChangeLog | 6 ++++++ gcc/ada/s-osinte-kfreebsd-gnu.ads | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index a238a4386a3..ebd9f3cb4c1 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2015-12-06 Eric Botcazou + + PR ada/56274 + * s-osinte-kfreebsd-gnu.ads (pthread_rwlock_t): New subtype. + (pthread_rwlockattr_t): Likewise. + 2015-12-06 Ludovic Brenta PR ada/49944 diff --git a/gcc/ada/s-osinte-kfreebsd-gnu.ads b/gcc/ada/s-osinte-kfreebsd-gnu.ads index a11cc6b4f9c..3f6ef9bb409 100644 --- a/gcc/ada/s-osinte-kfreebsd-gnu.ads +++ b/gcc/ada/s-osinte-kfreebsd-gnu.ads @@ -292,6 +292,14 @@ package System.OS_Interface is PTHREAD_SCOPE_PROCESS : constant := 0; PTHREAD_SCOPE_SYSTEM : constant := 2; + -- Read/Write lock not supported on kfreebsd. To add support both types + -- pthread_rwlock_t and pthread_rwlockattr_t must properly be defined + -- with the associated routines pthread_rwlock_[init/destroy] and + -- pthread_rwlock_[rdlock/wrlock/unlock]. + + subtype pthread_rwlock_t is pthread_mutex_t; + subtype pthread_rwlockattr_t is pthread_mutexattr_t; + ----------- -- Stack -- ----------- -- 2.30.2