xref: /third_party/musl/src/thread/pthread_attr_init.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_attr_init(pthread_attr_t *a)
4570af302Sopenharmony_ci{
5570af302Sopenharmony_ci	*a = (pthread_attr_t){0};
6570af302Sopenharmony_ci	__acquire_ptc();
7570af302Sopenharmony_ci	a->_a_stacksize = __default_stacksize;
8570af302Sopenharmony_ci	a->_a_guardsize = __default_guardsize;
9570af302Sopenharmony_ci#ifdef __LITEOS_A__
10570af302Sopenharmony_ci	a->_a_policy = SCHED_RR;
11570af302Sopenharmony_ci	a->_a_prio = 25;
12570af302Sopenharmony_ci#endif
13570af302Sopenharmony_ci	__release_ptc();
14570af302Sopenharmony_ci	return 0;
15570af302Sopenharmony_ci}
16

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