diff mbox

Fix PR ada/56274

Message ID 1966134.1hNO6ORo1A@polaris
State New
Headers show

Commit Message

Eric Botcazou Dec. 6, 2015, 3:29 p.m. UTC
This just mimics what's done on FreeBSD.

Applied on all active branches.


2015-12-06  Eric Botcazou  <ebotcazou@adacore.com>

	PR ada/56274
	* s-osinte-kfreebsd-gnu.ads (pthread_rwlock_t): New subtype.
	(pthread_rwlockattr_t): Likewise.
diff mbox

Patch

Index: s-osinte-kfreebsd-gnu.ads
===================================================================
--- s-osinte-kfreebsd-gnu.ads	(revision 231333)
+++ s-osinte-kfreebsd-gnu.ads	(working copy)
@@ -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 --
    -----------