From: Samuel Thibault <samuel.thibault@ens-lyon.org>
To: libc-alpha@sourceware.org
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>, commit-hurd@gnu.org
Subject: [hurd,commited] htl: Add internal version of __pthread_mutex_timedlock
Date: Tue, 14 Jan 2020 19:52:45 +0100 [thread overview]
Message-ID: <20200114185255.25813-2-samuel.thibault@ens-lyon.org> (raw)
In-Reply-To: <20200114185255.25813-1-samuel.thibault@ens-lyon.org>
The C11 threads implementation will need it.
---
htl/Versions | 1 +
sysdeps/htl/pt-mutex-timedlock.c | 3 ++-
sysdeps/htl/pthreadP.h | 2 ++
sysdeps/mach/hurd/htl/pt-mutex-timedlock.c | 3 ++-
4 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/htl/Versions b/htl/Versions
index 1c306acf5c..77f7335b9c 100644
--- a/htl/Versions
+++ b/htl/Versions
@@ -155,5 +155,6 @@ libpthread {
__pthread_setspecific;
__pthread_getattr_np;
__pthread_attr_getstack;
+ __pthread_mutex_timedlock;
}
}
diff --git a/sysdeps/htl/pt-mutex-timedlock.c b/sysdeps/htl/pt-mutex-timedlock.c
index d0ebb2975e..0e50f38ef2 100644
--- a/sysdeps/htl/pt-mutex-timedlock.c
+++ b/sysdeps/htl/pt-mutex-timedlock.c
@@ -189,8 +189,9 @@ __pthread_mutex_timedlock_internal (struct __pthread_mutex *mutex,
}
int
-pthread_mutex_timedlock (struct __pthread_mutex *mutex,
+__pthread_mutex_timedlock (struct __pthread_mutex *mutex,
const struct timespec *abstime)
{
return __pthread_mutex_timedlock_internal (mutex, abstime);
}
+strong_alias (__pthread_mutex_timedlock, pthread_mutex_timedlock)
diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h
index af0154538a..affe7cdf53 100644
--- a/sysdeps/htl/pthreadP.h
+++ b/sysdeps/htl/pthreadP.h
@@ -29,6 +29,8 @@ extern struct __pthread **__pthread_threads;
extern int _pthread_mutex_init (pthread_mutex_t *mutex, const pthread_mutexattr_t *attr);
extern int __pthread_mutex_lock (pthread_mutex_t *__mutex);
+extern int __pthread_mutex_timedlock (pthread_mutex_t *__mutex,
+ const struct timespec *__abstime);
extern int __pthread_mutex_unlock (pthread_mutex_t *__mutex);
extern int __pthread_cond_broadcast (pthread_cond_t *cond);
diff --git a/sysdeps/mach/hurd/htl/pt-mutex-timedlock.c b/sysdeps/mach/hurd/htl/pt-mutex-timedlock.c
index 13136ddfe1..e83bc57875 100644
--- a/sysdeps/mach/hurd/htl/pt-mutex-timedlock.c
+++ b/sysdeps/mach/hurd/htl/pt-mutex-timedlock.c
@@ -24,7 +24,7 @@
#include <hurdlock.h>
int
-pthread_mutex_timedlock (pthread_mutex_t *mtxp, const struct timespec *tsp)
+__pthread_mutex_timedlock (pthread_mutex_t *mtxp, const struct timespec *tsp)
{
struct __pthread *self;
int ret, flags = mtxp->__flags & GSYNC_SHARED;
@@ -76,3 +76,4 @@ pthread_mutex_timedlock (pthread_mutex_t *mtxp, const struct timespec *tsp)
return ret;
}
+strong_alias (__pthread_mutex_timedlock, pthread_mutex_timedlock)
--
2.24.1
next prev parent reply other threads:[~2020-01-14 18:54 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-14 18:52 [PATCH 00/10] Port C11 threads to GNU/Hurd Samuel Thibault
2020-01-14 18:52 ` Samuel Thibault [this message]
2020-01-14 18:52 ` [PATCH 01/10] htl: Rename _pthread_mutex_init/destroy to __pthread_mutex_init/destroy Samuel Thibault
2020-01-17 20:40 ` Adhemerval Zanella
2020-01-21 21:28 ` Samuel Thibault
2020-01-27 21:55 ` Removing internal symbols (Was: htl: Rename _pthread_mutex_init/destroy to __pthread_mutex_init/destroy) Samuel Thibault
2020-01-28 12:56 ` Adhemerval Zanella
2020-01-28 13:58 ` Removing internal symbols Florian Weimer
2020-01-14 18:52 ` [PATCH 02/10] htl: Add missing internal functions declarations Samuel Thibault
2020-01-20 17:11 ` Adhemerval Zanella
2020-01-14 18:52 ` [PATCH 03/10] htl: Add support for C11 threads behavior Samuel Thibault
2020-01-20 17:15 ` Adhemerval Zanella
2020-01-14 18:52 ` [PATCH 04/10] htl: Make __PTHREAD_ONCE_INIT more flexible Samuel Thibault
2020-01-20 18:01 ` Adhemerval Zanella
2020-01-20 18:29 ` Samuel Thibault
2020-01-14 18:52 ` [PATCH 05/10] nptl: Move nptl-specific types to separate header Samuel Thibault
2020-01-20 18:31 ` Adhemerval Zanella
2020-01-14 18:52 ` [PATCH 06/10] C11 threads: do not require PTHREAD_DESTRUCTOR_ITERATIONS Samuel Thibault
2020-01-20 18:40 ` Adhemerval Zanella
2020-01-14 18:52 ` [PATCH 07/10] C11 threads: Fix thrd_t / pthread_t compatibility assertion Samuel Thibault
2020-01-20 18:52 ` Adhemerval Zanella
2020-01-14 18:52 ` [PATCH 08/10] C11 threads: make thrd_join more portable Samuel Thibault
2020-01-20 18:53 ` Adhemerval Zanella
2020-01-14 18:52 ` [PATCH 09/10] htl: Add C11 threads types definitions Samuel Thibault
2020-01-20 19:08 ` Adhemerval Zanella
2020-01-20 20:58 ` Samuel Thibault
2020-01-21 11:35 ` Adhemerval Zanella
2020-01-14 18:52 ` [PATCH 10/10] C11 threads: Move implementation to sysdeps/pthread Samuel Thibault
2020-01-21 12:39 ` Adhemerval Zanella
2020-01-21 22:01 ` Samuel Thibault
2020-01-22 12:36 ` Adhemerval Zanella
-- strict thread matches above, loose matches on Subject: below --
2020-01-13 19:42 [hurd,commited] htl: Add internal version of __pthread_mutex_timedlock Samuel Thibault
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/libc/involved.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200114185255.25813-2-samuel.thibault@ens-lyon.org \
--to=samuel.thibault@ens-lyon.org \
--cc=commit-hurd@gnu.org \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).