OSDN Git Service

PR other/52438
[pf3gnuchains/gcc-fork.git] / gcc / ada / s-osinte-darwin.ads
index 391866c..ff04803 100644 (file)
@@ -108,7 +108,7 @@ package System.OS_Interface is
    SIGUSR1    : constant := 30; --  user defined signal 1
    SIGUSR2    : constant := 31; --  user defined signal 2
 
-   SIGADAABORT : constant := SIGTERM;
+   SIGADAABORT : constant := SIGABRT;
    --  Change this if you want to use another signal for task abort.
    --  SIGTERM might be a good one.
 
@@ -183,10 +183,7 @@ package System.OS_Interface is
 
    type timespec is private;
 
-   type clockid_t is private;
-
-   CLOCK_REALTIME  : constant clockid_t;
-   CLOCK_MONOTONIC : constant clockid_t;
+   type clockid_t is new int;
 
    function clock_gettime
      (clock_id : clockid_t;
@@ -256,6 +253,14 @@ package System.OS_Interface is
    PTHREAD_SCOPE_PROCESS : constant := 2;
    PTHREAD_SCOPE_SYSTEM  : constant := 1;
 
+   --  Read/Write lock not supported on Darwin. 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 --
    -----------
@@ -516,10 +521,6 @@ private
    end record;
    pragma Convention (C, timespec);
 
-   type clockid_t is new int;
-   CLOCK_REALTIME  : constant clockid_t := 0;
-   CLOCK_MONOTONIC : constant clockid_t := CLOCK_REALTIME;
-
    --
    --  Darwin specific signal implementation
    --