public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Fix PR ada/56274
@ 2015-12-06 15:29 Eric Botcazou
  0 siblings, 0 replies; only message in thread
From: Eric Botcazou @ 2015-12-06 15:29 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 257 bytes --]

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.

-- 
Eric Botcazou

[-- Attachment #2: p.diff --]
[-- Type: text/x-patch, Size: 766 bytes --]

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 --
    -----------

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-12-06 15:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-06 15:29 Fix PR ada/56274 Eric Botcazou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).