xref: /third_party/musl/src/thread/pthread_setcancelstate.c
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/musl/src/thread/
1570af302Sopenharmony_ci#include "pthread_impl.h"
2570af302Sopenharmony_ci
3570af302Sopenharmony_ciint __pthread_setcancelstate(int new, int *old)
4570af302Sopenharmony_ci{
5570af302Sopenharmony_ci#ifdef FEATURE_PTHREAD_CANCEL
6570af302Sopenharmony_ci	if (new > 2U) return EINVAL;
7570af302Sopenharmony_ci	struct pthread *self = __pthread_self();
8570af302Sopenharmony_ci	if (old) *old = self->canceldisable;
9570af302Sopenharmony_ci	self->canceldisable = new;
10570af302Sopenharmony_ci	return 0;
11570af302Sopenharmony_ci#endif
12570af302Sopenharmony_ci}
13570af302Sopenharmony_ci
14570af302Sopenharmony_ciweak_alias(__pthread_setcancelstate, pthread_setcancelstate);
15

Indexes created Thu Nov 07 10:32:03 CST 2024