Remove leaf attribute where appropriate

This change fixes a bug where gcc assumed thread synchronization such as
pthread_cond_wait() wouldn't alter static variables, because the headers
were using __attribute__((__leaf__)) inappropriately.
This commit is contained in:
Justine Tunney 2025-01-02 08:07:15 -08:00
parent f24c854b28
commit fde03f8487
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
9 changed files with 106 additions and 61 deletions

View file

@ -13,12 +13,12 @@ int pthread_attr_getschedparam(const pthread_attr_t *, struct sched_param *) lib
int pthread_attr_getsigmask_np(const pthread_attr_t *, sigset_t *) libcesque paramsnonnull((1));
int pthread_attr_setschedparam(pthread_attr_t *, const struct sched_param *) libcesque paramsnonnull();
int pthread_attr_setsigmask_np(pthread_attr_t *, const sigset_t *) libcesque paramsnonnull((1));
int pthread_cond_timedwait(pthread_cond_t *, pthread_mutex_t *, const struct timespec *) libcesque paramsnonnull((1, 2));
int pthread_cond_timedwait(pthread_cond_t *, pthread_mutex_t *, const struct timespec *) dontthrow paramsnonnull((1, 2));
int pthread_getaffinity_np(pthread_t, size_t, cpu_set_t *) libcesque paramsnonnull();
int pthread_getschedparam(pthread_t, int *, struct sched_param *) libcesque paramsnonnull();
int pthread_setaffinity_np(pthread_t, size_t, const cpu_set_t *) libcesque paramsnonnull();
int pthread_setschedparam(pthread_t, int, const struct sched_param *) libcesque paramsnonnull();
int pthread_timedjoin_np(pthread_t, void **, struct timespec *) libcesque;
int pthread_timedjoin_np(pthread_t, void **, struct timespec *) dontthrow;
/* clang-format off */
COSMOPOLITAN_C_END_