pt-join \
pt-spin-inlines \
pt-cleanup \
- pt-setcancelstate \
pt-testcancel \
pt-cancel \
pt-mutex-transfer-np \
pt-nthreads \
pt-pthread_self \
pt-self pt-equal \
+ pt-setcancelstate \
pt-setcanceltype \
pt-setschedparam \
pt-sigmask \
pthread_mutexattr_setprotocol;
pthread_mutexattr_setpshared;
pthread_mutexattr_settype;
+ pthread_setcancelstate;
pthread_setcanceltype;
pthread_sigmask;
}
__pthread_attr_setstacksize;
__pthread_attr_setstackaddr;
__pthread_attr_setstack;
+ __pthread_setcancelstate;
__pthread_cond_broadcast;
__pthread_cond_destroy;
__pthread_cond_init;
pthread_rwlockattr_destroy; pthread_rwlockattr_getpshared;
pthread_rwlockattr_init; pthread_rwlockattr_setpshared;
- pthread_setcancelstate;
pthread_setconcurrency;
pthread_setschedprio; pthread_setspecific;
exit (EXIT_SUCCESS))
strong_alias (__pthread_exit, pthread_exit);
-FORWARD (__pthread_setcancelstate, (int state, int *oldstate),
- (state, oldstate), 0)
-strong_alias (__pthread_setcancelstate, pthread_setcancelstate);
-
FORWARD2 (__pthread_get_cleanup_stack, struct __pthread_cancelation_handler **,
(void), (), return &__pthread_cleanup_stack);
#if IS_IN (libpthread)
static const struct pthread_functions pthread_functions = {
.ptr___pthread_exit = __pthread_exit,
- .ptr___pthread_setcancelstate = __pthread_setcancelstate,
.ptr___pthread_get_cleanup_stack = __pthread_get_cleanup_stack,
.ptr_pthread_once = __pthread_once,
.ptr_pthread_rwlock_rdlock = __pthread_rwlock_rdlock,
<https://www.gnu.org/licenses/>. */
#include <pthread.h>
-
+#include <shlib-compat.h>
#include <pt-internal.h>
int
return 0;
}
+libc_hidden_def (__pthread_setcancelstate)
+versioned_symbol (libc, __pthread_setcancelstate, pthread_setcancelstate, GLIBC_2_21);
-weak_alias (__pthread_setcancelstate, pthread_setcancelstate);
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_21)
+compat_symbol (libc, __pthread_setcancelstate, pthread_setcancelstate, GLIBC_2_12);
+#endif
extern int __pthread_mutex_init (pthread_mutex_t *__mutex,
const pthread_mutexattr_t *__mutex_attr);
-
extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex);
libc_hidden_proto (__pthread_mutex_destroy)
void (*__parent) (void),
void (*__child) (void));
+extern int __pthread_setcancelstate (int state, int *oldstate);
+libc_hidden_proto (__pthread_setcancelstate)
/* Make the pthread functions weak so that we can elide them from
single-threaded processes. */
#if !defined(__NO_WEAK_PTHREAD_ALIASES) && !IS_IN (libpthread)
weak_extern (__pthread_once)
weak_extern (__pthread_initialize)
weak_extern (__pthread_atfork)
-weak_extern (__pthread_setcancelstate)
# else
# pragma weak __pthread_rwlock_destroy
# pragma weak __pthread_rwlock_rdlock
# pragma weak __pthread_once
# pragma weak __pthread_initialize
# pragma weak __pthread_atfork
-# pragma weak __pthread_setcancelstate
# endif
#endif
#include <pthread.h>
void __pthread_exit (void *) __attribute__ ((__noreturn__));
-int __pthread_setcancelstate (int, int *);
struct __pthread_cancelation_handler **__pthread_get_cleanup_stack (void);
int __pthread_once (pthread_once_t *, void (*) (void));
int __pthread_rwlock_rdlock (pthread_rwlock_t *);
struct pthread_functions
{
void (*ptr___pthread_exit) (void *) __attribute__ ((__noreturn__));
- int (*ptr___pthread_setcancelstate) (int, int *);
struct __pthread_cancelation_handler **(*ptr___pthread_get_cleanup_stack) (void);
int (*ptr_pthread_once) (pthread_once_t *, void (*) (void));
int (*ptr_pthread_rwlock_rdlock) (pthread_rwlock_t *);
int __pthread_key_delete (pthread_key_t key);
int __pthread_once (pthread_once_t *once_control, void (*init_routine) (void));
-int __pthread_setcancelstate (int state, int *oldstate);
-
int __pthread_getattr_np (pthread_t, pthread_attr_t *);
int __pthread_attr_getstackaddr (const pthread_attr_t *__restrict __attr,
void **__restrict __stackaddr);
GLIBC_2.12 pthread_mutexattr_setpshared F
GLIBC_2.12 pthread_mutexattr_settype F
GLIBC_2.12 pthread_self F
+GLIBC_2.12 pthread_setcancelstate F
GLIBC_2.12 pthread_setcanceltype F
GLIBC_2.12 pthread_setschedparam F
GLIBC_2.12 pthread_sigmask F
GLIBC_2.12 pthread_rwlockattr_getpshared F
GLIBC_2.12 pthread_rwlockattr_init F
GLIBC_2.12 pthread_rwlockattr_setpshared F
-GLIBC_2.12 pthread_setcancelstate F
GLIBC_2.12 pthread_setconcurrency F
GLIBC_2.12 pthread_setschedprio F
GLIBC_2.12 pthread_setspecific F
GLIBC_2.38 pthread_rwlockattr_getpshared F
GLIBC_2.38 pthread_rwlockattr_init F
GLIBC_2.38 pthread_rwlockattr_setpshared F
-GLIBC_2.38 pthread_setcancelstate F
GLIBC_2.38 pthread_setconcurrency F
GLIBC_2.38 pthread_setschedprio F
GLIBC_2.38 pthread_setspecific F
#include <futex-internal.h>
#include <libc-lock.h>
+
#if !PTHREAD_IN_LIBC
/* The private names are not exported from libc. */
# define __link link
}
/* Disable asynchronous cancellation. */
-#ifdef __libc_ptf_call
- int state;
- __libc_ptf_call (__pthread_setcancelstate,
- (PTHREAD_CANCEL_DISABLE, &state), 0);
-#endif
+ int state = __pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, &state);
/* If the semaphore object has to exist simply open it. */
if ((oflag & O_CREAT) == 0 || (oflag & O_EXCL) == 0)
}
out:
-#ifdef __libc_ptf_call
- __libc_ptf_call (__pthread_setcancelstate, (state, NULL), 0);
-#endif
+ __pthread_setcancelstate (state, NULL);
return result;
}