public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/1] libc: Added Prototypes for POSIX Clock APIs
@ 2021-08-06 14:07 Matt Joyce
  2021-08-06 14:07 ` [PATCH 1/1] libc: Added prototypes for new POSIX APIs Matt Joyce
  0 siblings, 1 reply; 5+ messages in thread
From: Matt Joyce @ 2021-08-06 14:07 UTC (permalink / raw)
  To: newlib; +Cc: Matt Joyce

Dear Newlib Maintainers,

I added function prototypes to newlib/libc/include/pthread.h for
the following APIs:

1) pthread_cond_clockwait()
2) pthread_mutex_clocklock()
3) pthread_rwlock_clockrdlock()
3) pthread_rwlock_clockwrlock()

All four will be newly added to the Issue 8 POSIX Standard.

Thank you very much for your time!

Matt Joyce (1):
  libc: Added prototypes for new POSIX APIs

 newlib/libc/include/pthread.h | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

-- 
2.31.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/1] libc: Added prototypes for new POSIX APIs
  2021-08-06 14:07 [PATCH 0/1] libc: Added Prototypes for POSIX Clock APIs Matt Joyce
@ 2021-08-06 14:07 ` Matt Joyce
  2021-08-06 17:48   ` Corinna Vinschen
  0 siblings, 1 reply; 5+ messages in thread
From: Matt Joyce @ 2021-08-06 14:07 UTC (permalink / raw)
  To: newlib; +Cc: Matt Joyce

Added function prototypes to newlib/libc/include/pthread.h
for the following Issue 8 Standard APIs:
pthread_cond_clockwait()
pthread_mutex_clocklock()
pthread_rwlock_clockrdlock()
pthread_rwlock_clockwrlock()
---
 newlib/libc/include/pthread.h | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/newlib/libc/include/pthread.h b/newlib/libc/include/pthread.h
index c9d24d6e0..9b91ea68d 100644
--- a/newlib/libc/include/pthread.h
+++ b/newlib/libc/include/pthread.h
@@ -87,6 +87,13 @@ int	pthread_mutex_timedlock (pthread_mutex_t *__mutex,
 
 #endif /* _POSIX_TIMEOUTS */
 
+/* Using __MISC_VISIBLE until POSIX Issue 8 is officially released */ 
+#if __MISC_VISIBLE
+/* The Issue 8 standard adds pthread_mutex_clocklock() */
+int pthread_mutex_clocklock(pthread_mutex_t *__restrict, clockid_t,
+				   const struct timespec *__restrict);
+#endif /* __MISC_VISIBLE */ 
+
 /* Condition Variable Initialization Attributes, P1003.1c/Draft 10, p. 96 */
  
 int	pthread_condattr_init (pthread_condattr_t *__attr);
@@ -126,6 +133,14 @@ int	pthread_cond_wait (pthread_cond_t *__cond, pthread_mutex_t *__mutex);
 int	pthread_cond_timedwait (pthread_cond_t *__cond,
 				pthread_mutex_t *__mutex,
 				const struct timespec *__abstime);
+
+/* Using __MISC_VISIBLE until POSIX Issue 8 is officially released */ 
+#if __MISC_VISIBLE
+/* The Issue 8 standard adds pthread_cond_clockwait() */
+int pthread_cond_clockwait(pthread_cond_t *__restrict, 
+                   pthread_mutex_t *__restrict, clockid_t,
+				   const struct timespec *__restrict);
+#endif /* __MISC_VISIBLE */ 
  
 #if defined(_POSIX_THREAD_PRIORITY_SCHEDULING)
 
@@ -423,6 +438,16 @@ int	pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock);
 int	pthread_rwlock_timedwrlock (pthread_rwlock_t *__rwlock,
 				    const struct timespec *__abstime);
 
+/* Using __MISC_VISIBLE until POSIX Issue 8 is officially released */ 
+#if __MISC_VISIBLE
+/* The Issue 8 standard adds pthread_rwlock_clockrdlock()
+*  and pthread_rwlock_clockwrlock()*/
+int pthread_rwlock_clockrdlock(pthread_rwlock_t *__restrict, clockid_t,  
+				   const struct timespec *__restrict);
+int pthread_rwlock_clockwrlock(pthread_rwlock_t *__restrict, clockid_t,  
+				   const struct timespec *__restrict);
+#endif /* __MISC_VISIBLE */ 
+
 #endif /* defined(_POSIX_READER_WRITER_LOCKS) */
 
 
-- 
2.31.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] libc: Added prototypes for new POSIX APIs
  2021-08-06 14:07 ` [PATCH 1/1] libc: Added prototypes for new POSIX APIs Matt Joyce
@ 2021-08-06 17:48   ` Corinna Vinschen
  2021-08-06 18:05     ` Joel Sherrill
  0 siblings, 1 reply; 5+ messages in thread
From: Corinna Vinschen @ 2021-08-06 17:48 UTC (permalink / raw)
  To: Matt Joyce; +Cc: newlib

Hi Matt,

On Aug  6 16:07, Matt Joyce wrote:
> Added function prototypes to newlib/libc/include/pthread.h
> for the following Issue 8 Standard APIs:
> pthread_cond_clockwait()
> pthread_mutex_clocklock()
> pthread_rwlock_clockrdlock()
> pthread_rwlock_clockwrlock()
> ---
>  newlib/libc/include/pthread.h | 25 +++++++++++++++++++++++++
>  1 file changed, 25 insertions(+)
> 
> diff --git a/newlib/libc/include/pthread.h b/newlib/libc/include/pthread.h
> index c9d24d6e0..9b91ea68d 100644
> --- a/newlib/libc/include/pthread.h
> +++ b/newlib/libc/include/pthread.h
> @@ -87,6 +87,13 @@ int	pthread_mutex_timedlock (pthread_mutex_t *__mutex,
>  
>  #endif /* _POSIX_TIMEOUTS */
>  
> +/* Using __MISC_VISIBLE until POSIX Issue 8 is officially released */ 
> +#if __MISC_VISIBLE

I think these symbols should use the __GNU_VISIBLE feature test macro.
That would also be compatible with GLibC.


Corinna


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] libc: Added prototypes for new POSIX APIs
  2021-08-06 17:48   ` Corinna Vinschen
@ 2021-08-06 18:05     ` Joel Sherrill
  0 siblings, 0 replies; 5+ messages in thread
From: Joel Sherrill @ 2021-08-06 18:05 UTC (permalink / raw)
  To: Newlib, Matt Joyce

On Fri, Aug 6, 2021 at 12:48 PM Corinna Vinschen <vinschen@redhat.com> wrote:
>
> Hi Matt,
>
> On Aug  6 16:07, Matt Joyce wrote:
> > Added function prototypes to newlib/libc/include/pthread.h
> > for the following Issue 8 Standard APIs:
> > pthread_cond_clockwait()
> > pthread_mutex_clocklock()
> > pthread_rwlock_clockrdlock()
> > pthread_rwlock_clockwrlock()
> > ---
> >  newlib/libc/include/pthread.h | 25 +++++++++++++++++++++++++
> >  1 file changed, 25 insertions(+)
> >
> > diff --git a/newlib/libc/include/pthread.h b/newlib/libc/include/pthread.h
> > index c9d24d6e0..9b91ea68d 100644
> > --- a/newlib/libc/include/pthread.h
> > +++ b/newlib/libc/include/pthread.h
> > @@ -87,6 +87,13 @@ int        pthread_mutex_timedlock (pthread_mutex_t *__mutex,
> >
> >  #endif /* _POSIX_TIMEOUTS */
> >
> > +/* Using __MISC_VISIBLE until POSIX Issue 8 is officially released */
> > +#if __MISC_VISIBLE
>
> I think these symbols should use the __GNU_VISIBLE feature test macro.
> That would also be compatible with GLibC.

Thanks Corinna. I'll take the bullet for telling him to use that one.

--joel

>
>
> Corinna
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 0/1] libc: Added Prototypes for POSIX Clock APIs
@ 2021-08-06 20:04 Matt Joyce
  0 siblings, 0 replies; 5+ messages in thread
From: Matt Joyce @ 2021-08-06 20:04 UTC (permalink / raw)
  To: newlib; +Cc: Matt Joyce

Hello,

Per Corinna's instructions, I'm changing __Misc_VISIBLE to
__GNU_VISIBLE.

Thank you again for your time!

********************

I added function prototypes to newlib/libc/include/pthread.h for
the following APIs:

1) pthread_cond_clockwait()
2) pthread_mutex_clocklock()
3) pthread_rwlock_clockrdlock()
3) pthread_rwlock_clockwrlock()

All four will be newly added to the Issue 8 POSIX Standard.

Thank you very much for your time!

Matt Joyce (1):
  libc: Added prototypes for new POSIX APIs

 newlib/libc/include/pthread.h | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

-- 
2.31.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-08-06 20:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-06 14:07 [PATCH 0/1] libc: Added Prototypes for POSIX Clock APIs Matt Joyce
2021-08-06 14:07 ` [PATCH 1/1] libc: Added prototypes for new POSIX APIs Matt Joyce
2021-08-06 17:48   ` Corinna Vinschen
2021-08-06 18:05     ` Joel Sherrill
2021-08-06 20:04 [PATCH 0/1] libc: Added Prototypes for POSIX Clock APIs Matt Joyce

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