aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/nptl/pthread.h45
-rw-r--r--sysdeps/pthread/semaphore.h10
-rw-r--r--sysdeps/unix/sysv/linux/bits/msq.h17
-rw-r--r--sysdeps/unix/sysv/linux/bits/stat.h6
-rw-r--r--sysdeps/unix/sysv/linux/sys/timerfd.h19
-rw-r--r--sysdeps/unix/sysv/linux/sys/timex.h32
6 files changed, 124 insertions, 5 deletions
diff --git a/sysdeps/nptl/pthread.h b/sysdeps/nptl/pthread.h
index df049ab..5fb8a3f 100644
--- a/sysdeps/nptl/pthread.h
+++ b/sysdeps/nptl/pthread.h
@@ -765,6 +765,17 @@ extern int pthread_mutex_lock (pthread_mutex_t *__mutex)
#ifdef __USE_XOPEN2K
/* Wait until lock becomes available, or specified time passes. */
+#ifdef __USE_TIME_BITS64
+# if defined(__REDIRECT)
+extern int __REDIRECT (pthread_mutex_timedlock,
+ (pthread_mutex_t *__restrict __mutex,
+ const struct timespec *__restrict __abstime),
+ __pthread_mutex_timedlock64)
+ __THROWNL __nonnull ((1, 2));
+# else
+# define pthread_mutex_timedlock __pthread_mutex_timedlock64
+# endif
+#endif
extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
const struct timespec *__restrict
__abstime) __THROWNL __nonnull ((1, 2));
@@ -904,6 +915,17 @@ extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock)
# ifdef __USE_XOPEN2K
/* Try to acquire read lock for RWLOCK or return after specfied time. */
+#ifdef __USE_TIME_BITS64
+# if defined(__REDIRECT)
+extern int __REDIRECT (pthread_rwlock_timedrdlock,
+ (pthread_rwlock_t *__restrict __rwlock,
+ const struct timespec *__restrict __abstime),
+ __pthread_rwlock_timedrdlock64)
+ __THROWNL __nonnull ((1, 2));
+# else
+# define pthread_rwlock_timedrdlock __pthread_rwlock_timedrdlock64
+# endif
+#endif
extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
const struct timespec *__restrict
__abstime) __THROWNL __nonnull ((1, 2));
@@ -919,6 +941,17 @@ extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock)
# ifdef __USE_XOPEN2K
/* Try to acquire write lock for RWLOCK or return after specfied time. */
+#ifdef __USE_TIME_BITS64
+# if defined(__REDIRECT)
+extern int __REDIRECT (pthread_rwlock_timedwrlock,
+ (pthread_rwlock_t *__restrict __rwlock,
+ const struct timespec *__restrict __abstime),
+ __pthread_rwlock_timedwrlock64)
+ __THROWNL __nonnull ((1, 2));
+# else
+# define pthread_rwlock_timedwrlock __pthread_rwlock_timedwrlock64
+# endif
+#endif
extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
const struct timespec *__restrict
__abstime) __THROWNL __nonnull ((1, 2));
@@ -998,6 +1031,18 @@ extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,
This function is a cancellation point and therefore not marked with
__THROW. */
+#ifdef __USE_TIME_BITS64
+# if defined(__REDIRECT)
+extern int __REDIRECT (pthread_cond_timedwait,
+ (pthread_cond_t *__restrict __cond,
+ pthread_mutex_t *__restrict __mutex,
+ const struct timespec *__restrict __abstime),
+ __pthread_cond_timedwait64)
+ __nonnull ((1, 2, 3));
+# else
+# define pthread_cond_timedwait __pthread_cond_timedwait64
+# endif
+#endif
extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
pthread_mutex_t *__restrict __mutex,
const struct timespec *__restrict __abstime)
diff --git a/sysdeps/pthread/semaphore.h b/sysdeps/pthread/semaphore.h
index ff672eb..3f8207a 100644
--- a/sysdeps/pthread/semaphore.h
+++ b/sysdeps/pthread/semaphore.h
@@ -57,6 +57,16 @@ extern int sem_wait (sem_t *__sem);
This function is a cancellation point and therefore not marked with
__THROW. */
+#ifdef __USE_TIME_BITS64
+# if defined(__REDIRECT)
+extern struct tm * __REDIRECT (sem_timedwait,
+ (sem_t *__restrict __sem,
+ const struct timespec *__restrict __abstime),
+ __sem_timedwait64);
+# else
+# define sem_timedwait __sem_timedwait64
+# endif
+#endif
extern int sem_timedwait (sem_t *__restrict __sem,
const struct timespec *__restrict __abstime);
#endif
diff --git a/sysdeps/unix/sysv/linux/bits/msq.h b/sysdeps/unix/sysv/linux/bits/msq.h
index 5f43fa3..3adaf3b 100644
--- a/sysdeps/unix/sysv/linux/bits/msq.h
+++ b/sysdeps/unix/sysv/linux/bits/msq.h
@@ -46,6 +46,22 @@ typedef __syscall_ulong_t msglen_t;
/* Structure of record for one message inside the kernel.
The type `struct msg' is opaque. */
+#ifdef __USE_TIME_BITS64
+struct msqid_ds
+{
+ struct ipc_perm msg_perm; /* structure describing operation permission */
+ __time64_t msg_stime; /* time of last msgsnd command */
+ __time64_t msg_rtime; /* time of last msgrcv command */
+ __time64_t msg_ctime; /* time of last change */
+ unsigned long int __msg_cbytes; /* current number of bytes on queue */
+ msgqnum_t msg_qnum; /* number of messages currently on queue */
+ msglen_t msg_qbytes; /* max number of bytes allowed on queue */
+ __pid_t msg_lspid; /* pid of last msgsnd() */
+ __pid_t msg_lrpid; /* pid of last msgrcv() */
+ unsigned long int __glibc_reserved4;
+ unsigned long int __glibc_reserved5;
+};
+#else
struct msqid_ds
{
struct ipc_perm msg_perm; /* structure describing operation permission */
@@ -60,6 +76,7 @@ struct msqid_ds
__syscall_ulong_t __glibc_reserved4;
__syscall_ulong_t __glibc_reserved5;
};
+#endif
#ifdef __USE_MISC
diff --git a/sysdeps/unix/sysv/linux/bits/stat.h b/sysdeps/unix/sysv/linux/bits/stat.h
index 48ef82d..fde673e 100644
--- a/sysdeps/unix/sysv/linux/bits/stat.h
+++ b/sysdeps/unix/sysv/linux/bits/stat.h
@@ -119,11 +119,11 @@ struct stat64
struct timespec st_mtim; /* Time of last modification. */
struct timespec st_ctim; /* Time of last status change. */
# else
- __time_t st_atime; /* Time of last access. */
+ time_t st_atime; /* Time of last access. */
unsigned long int st_atimensec; /* Nscecs of last access. */
- __time_t st_mtime; /* Time of last modification. */
+ time_t st_mtime; /* Time of last modification. */
unsigned long int st_mtimensec; /* Nsecs of last modification. */
- __time_t st_ctime; /* Time of last status change. */
+ time_t st_ctime; /* Time of last status change. */
unsigned long int st_ctimensec; /* Nsecs of last status change. */
# endif
__ino64_t st_ino; /* File serial number. */
diff --git a/sysdeps/unix/sysv/linux/sys/timerfd.h b/sysdeps/unix/sysv/linux/sys/timerfd.h
index 37490cf..58d632e 100644
--- a/sysdeps/unix/sysv/linux/sys/timerfd.h
+++ b/sysdeps/unix/sysv/linux/sys/timerfd.h
@@ -44,11 +44,30 @@ extern int timerfd_create (__clockid_t __clock_id, int __flags) __THROW;
/* Set next expiration time of interval timer source UFD to UTMR. If
FLAGS has the TFD_TIMER_ABSTIME flag set the timeout value is
absolute. Optionally return the old expiration time in OTMR. */
+#ifdef __USE_TIME_BITS64
+# if defined(__REDIRECT)
+extern int __REDIRECT (timerfd_settime, (int __ufd, int __flags,
+ const struct itimerspec *__utmr,
+ struct itimerspec *__otmr),__timerfd_settime64)
+ __THROW;
+# else
+# define timerfd_settime __timerfd_settime64
+# endif
+#endif
extern int timerfd_settime (int __ufd, int __flags,
const struct itimerspec *__utmr,
struct itimerspec *__otmr) __THROW;
/* Return the next expiration time of UFD. */
+#ifdef __USE_TIME_BITS64
+# if defined(__REDIRECT)
+extern int __REDIRECT (timerfd_gettime, (int __ufd,
+ struct itimerspec *__otmr),__timerfd_gettime64)
+ __THROW;
+# else
+# define timerfd_gettime __timerfd_gettime64
+# endif
+#endif
extern int timerfd_gettime (int __ufd, struct itimerspec *__otmr) __THROW;
__END_DECLS
diff --git a/sysdeps/unix/sysv/linux/sys/timex.h b/sysdeps/unix/sysv/linux/sys/timex.h
index fd45929..d4ddb33 100644
--- a/sysdeps/unix/sysv/linux/sys/timex.h
+++ b/sysdeps/unix/sysv/linux/sys/timex.h
@@ -68,15 +68,43 @@ struct __ntptimeval64
__BEGIN_DECLS
extern int __adjtimex (struct timex *__ntx) __THROW;
+
+#ifdef __USE_TIME_BITS64
+# if defined(__REDIRECT)
+extern time_t __REDIRECT (adjtimex, (struct timex *__ntx),
+ __adjtimex64) __THROW;
+# else
+# define adjtimex __adjtimex64
+# endif
+#endif
extern int adjtimex (struct timex *__ntx) __THROW;
-#ifdef __REDIRECT_NTH
+#if __WORDSIZE > 32 || ! defined(__USE_TIME_BITS64)
+# ifdef __REDIRECT_NTH
extern int __REDIRECT_NTH (ntp_gettime, (struct ntptimeval *__ntv),
ntp_gettimex);
-#else
+# else
extern int ntp_gettimex (struct ntptimeval *__ntv) __THROW;
+# define ntp_gettime ntp_gettimex
+# endif
+#else
+# if defined(__REDIRECT)
+extern time_t __REDIRECT (ntp_gettimex, (struct ntptimeval *__ntv),
+ __ntp_gettimex64) __THROW;
+# else
+# define ntp_gettimex __ntp_gettimex64
+# endif
# define ntp_gettime ntp_gettimex
#endif
+
+#ifdef __USE_TIME_BITS64
+# if defined(__REDIRECT)
+extern int __REDIRECT (ntp_adjtime, (struct timex *__tntx),
+ __ntp_adjtime64) __THROW;
+# else
+# define ntp_adjtime __ntp_adjtime64
+# endif
+#endif
extern int ntp_adjtime (struct timex *__tntx) __THROW;
__END_DECLS