about summary refs log tree commit diff
path: root/nptl/sysdeps/unix/sysv
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/sysdeps/unix/sysv')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/timer_create.c12
-rw-r--r--nptl/sysdeps/unix/sysv/linux/timer_delete.c7
-rw-r--r--nptl/sysdeps/unix/sysv/linux/timer_settime.c2
3 files changed, 12 insertions, 9 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/timer_create.c b/nptl/sysdeps/unix/sysv/linux/timer_create.c
index 9e6b53ef37..97ffb6ddb6 100644
--- a/nptl/sysdeps/unix/sysv/linux/timer_create.c
+++ b/nptl/sysdeps/unix/sysv/linux/timer_create.c
@@ -115,6 +115,12 @@ timer_create (clock_id, evp, timerid)
 	    }
 
 	  free (newp);
+
+# ifndef __ASSUME_POSIX_TIMERS
+	  /* When we come here the syscall does not exist.  Make sure we
+	     do not try to use it again.  */
+	  __no_posix_timers = -1;
+# endif
 	}
       else
 	{
@@ -224,12 +230,6 @@ timer_create (clock_id, evp, timerid)
 	      return -1;
 	    }
 	}
-
-# ifndef __ASSUME_POSIX_TIMERS
-      /* When we come here the syscall does not exist.  Make sure we
-	 do not try to use it again.  */
-      __no_posix_timers = -1;
-# endif
     }
 
 # ifndef __ASSUME_POSIX_TIMERS
diff --git a/nptl/sysdeps/unix/sysv/linux/timer_delete.c b/nptl/sysdeps/unix/sysv/linux/timer_delete.c
index cf63364253..9028dc4efc 100644
--- a/nptl/sysdeps/unix/sysv/linux/timer_delete.c
+++ b/nptl/sysdeps/unix/sysv/linux/timer_delete.c
@@ -72,10 +72,13 @@ timer_delete (timerid)
 	 Return the error.  */
 # ifndef __ASSUME_POSIX_TIMERS
       if (errno != ENOSYS)
+	{
+	  __no_posix_timers = 1;
 # endif
-	return -1;
-
+	  return -1;
 # ifndef __ASSUME_POSIX_TIMERS
+	}
+
       __no_posix_timers = -1;
 # endif
     }
diff --git a/nptl/sysdeps/unix/sysv/linux/timer_settime.c b/nptl/sysdeps/unix/sysv/linux/timer_settime.c
index 7fc837cb5d..37ebf1dd53 100644
--- a/nptl/sysdeps/unix/sysv/linux/timer_settime.c
+++ b/nptl/sysdeps/unix/sysv/linux/timer_settime.c
@@ -46,7 +46,7 @@ timer_settime (timerid, flags, value, ovalue)
 {
 # undef timer_settime
 # ifndef __ASSUME_POSIX_TIMERS
-  if (__no_posix_timers == 0)
+  if (__no_posix_timers >= 0)
 # endif
     {
       struct timer *kt = (struct timer *) timerid;