Home
last modified time | relevance | path

Searched refs:attr (Results 1 – 21 of 21) sorted by relevance

/bionic/libc/bionic/
Dpthread_attr.cpp41 int pthread_attr_init(pthread_attr_t* attr) { in pthread_attr_init() argument
42 attr->flags = 0; in pthread_attr_init()
43 attr->stack_base = NULL; in pthread_attr_init()
44 attr->stack_size = PTHREAD_STACK_SIZE_DEFAULT; in pthread_attr_init()
45 attr->guard_size = PAGE_SIZE; in pthread_attr_init()
46 attr->sched_policy = SCHED_NORMAL; in pthread_attr_init()
47 attr->sched_priority = 0; in pthread_attr_init()
51 int pthread_attr_destroy(pthread_attr_t* attr) { in pthread_attr_destroy() argument
52 memset(attr, 0x42, sizeof(pthread_attr_t)); in pthread_attr_destroy()
56 int pthread_attr_setdetachstate(pthread_attr_t* attr, int state) { in pthread_attr_setdetachstate() argument
[all …]
Dpthread_cond.cpp65 #define COND_SET_CLOCK(attr, c) ((attr) | (c << 1)) argument
67 int pthread_condattr_init(pthread_condattr_t* attr) { in pthread_condattr_init() argument
68 *attr = 0; in pthread_condattr_init()
69 *attr |= PTHREAD_PROCESS_PRIVATE; in pthread_condattr_init()
70 *attr |= (CLOCK_REALTIME << 1); in pthread_condattr_init()
74 int pthread_condattr_getpshared(const pthread_condattr_t* attr, int* pshared) { in pthread_condattr_getpshared() argument
75 *pshared = static_cast<int>(COND_IS_SHARED(*attr)); in pthread_condattr_getpshared()
79 int pthread_condattr_setpshared(pthread_condattr_t* attr, int pshared) { in pthread_condattr_setpshared() argument
84 *attr |= pshared; in pthread_condattr_setpshared()
88 int pthread_condattr_getclock(const pthread_condattr_t* attr, clockid_t* clock) { in pthread_condattr_getclock() argument
[all …]
Dpthread_create.cpp96 if (__predict_true((thread->attr.flags & PTHREAD_ATTR_FLAG_DETACHED) == 0)) { in __init_thread()
103 if (thread->attr.sched_policy != SCHED_NORMAL) { in __init_thread()
105 param.sched_priority = thread->attr.sched_priority; in __init_thread()
106 if (sched_setscheduler(thread->tid, thread->attr.sched_policy, &param) == -1) { in __init_thread()
147 static int __allocate_thread(pthread_attr_t* attr, pthread_internal_t** threadp, void** child_stack… in __allocate_thread() argument
151 if (attr->stack_base == NULL) { in __allocate_thread()
154 mmap_size = BIONIC_ALIGN(attr->stack_size + sizeof(pthread_internal_t), PAGE_SIZE); in __allocate_thread()
155 attr->guard_size = BIONIC_ALIGN(attr->guard_size, PAGE_SIZE); in __allocate_thread()
156 attr->stack_base = __create_thread_mapped_space(mmap_size, attr->guard_size); in __allocate_thread()
157 if (attr->stack_base == NULL) { in __allocate_thread()
[all …]
Dpthread_rwlock.cpp72 …ne __always_inline __always_inline bool __rwlockattr_getpshared(const pthread_rwlockattr_t* attr) { in __rwlockattr_getpshared() argument
73 return (*attr & RWLOCKATTR_PSHARED_MASK) >> RWLOCKATTR_PSHARED_SHIFT; in __rwlockattr_getpshared()
76 …ways_inline __always_inline void __rwlockattr_setpshared(pthread_rwlockattr_t* attr, int pshared) { in __rwlockattr_setpshared() argument
77 *attr = (*attr & ~RWLOCKATTR_PSHARED_MASK) | (pshared << RWLOCKATTR_PSHARED_SHIFT); in __rwlockattr_setpshared()
80 static inline __always_inline int __rwlockattr_getkind(const pthread_rwlockattr_t* attr) { in __rwlockattr_getkind() argument
81 return (*attr & RWLOCKATTR_KIND_MASK) >> RWLOCKATTR_KIND_SHIFT; in __rwlockattr_getkind()
84 static inline __always_inline void __rwlockattr_setkind(pthread_rwlockattr_t* attr, int kind) { in __rwlockattr_setkind() argument
85 *attr = (*attr & ~RWLOCKATTR_KIND_MASK) | (kind << RWLOCKATTR_KIND_SHIFT); in __rwlockattr_setkind()
89 int pthread_rwlockattr_init(pthread_rwlockattr_t* attr) { in pthread_rwlockattr_init() argument
90 *attr = 0; in pthread_rwlockattr_init()
[all …]
Dpthread_mutex.cpp56 int pthread_mutexattr_init(pthread_mutexattr_t *attr) in pthread_mutexattr_init() argument
58 *attr = PTHREAD_MUTEX_DEFAULT; in pthread_mutexattr_init()
62 int pthread_mutexattr_destroy(pthread_mutexattr_t *attr) in pthread_mutexattr_destroy() argument
64 *attr = -1; in pthread_mutexattr_destroy()
68 int pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int *type_p) in pthread_mutexattr_gettype() argument
70 int type = (*attr & MUTEXATTR_TYPE_MASK); in pthread_mutexattr_gettype()
80 int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type) in pthread_mutexattr_settype() argument
86 *attr = (*attr & ~MUTEXATTR_TYPE_MASK) | type; in pthread_mutexattr_settype()
92 int pthread_mutexattr_setpshared(pthread_mutexattr_t *attr, int pshared) in pthread_mutexattr_setpshared() argument
96 *attr &= ~MUTEXATTR_SHARED_MASK; in pthread_mutexattr_setpshared()
[all …]
Dlibc_init_common.cpp94 pthread_attr_init(&main_thread.attr); in __libc_init_tls()
95 main_thread.attr.guard_size = 0; // The main thread has no guard page. in __libc_init_tls()
96 main_thread.attr.stack_size = 0; // User code should never see this; we'll compute it when asked. in __libc_init_tls()
Dndk_cruft.cpp96 extern "C" int pthread_attr_getstackaddr(const pthread_attr_t* attr, void** stack_addr) { in pthread_attr_getstackaddr() argument
99 *stack_addr = (char*)attr->stack_base + attr->stack_size; in pthread_attr_getstackaddr()
Dpthread_internal.cpp73 munmap(thread->attr.stack_base, thread->mmap_size); in __pthread_internal_free()
Dpthread_internal.h80 pthread_attr_t attr; member
Dpthread_exit.cpp119 _exit_with_stack_teardown(thread->attr.stack_base, thread->mmap_size); in pthread_exit()
/bionic/libc/stdio/
Dfileext.h64 pthread_mutexattr_t attr; \
65 pthread_mutexattr_init(&attr); \
66 pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); \
67 pthread_mutex_init(&_FLOCK(fp), &attr); \
68 pthread_mutexattr_destroy(&attr); \
/bionic/benchmarks/
Dsemaphore_benchmark.cpp97 pthread_attr_t attr; in Run() local
98 pthread_attr_init(&attr); in Run()
101 pthread_attr_setschedparam(&attr, &param); in Run()
102 pthread_attr_setschedpolicy(&attr, SCHED_OTHER); in Run()
103 pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); in Run()
105 pthread_create(&pthread, &attr, BM_semaphore_sem_post_start_thread, &semaphore); in Run()
106 pthread_attr_destroy(&attr); in Run()
/bionic/tests/
Dpthread_test.cpp169 pthread_attr_t attr; in TEST() local
170 ASSERT_EQ(0, pthread_attr_init(&attr)); in TEST()
171 ASSERT_EQ(0, pthread_attr_setstack(&attr, stack, stack_size)); in TEST()
174 ASSERT_EQ(0, pthread_create(&t, &attr, DirtyKeyFn, &key)); in TEST()
235 pthread_attr_t attr; in AssertDetached() local
236 ASSERT_EQ(0, pthread_getattr_np(t, &attr)); in AssertDetached()
238 ASSERT_EQ(0, pthread_attr_getdetachstate(&attr, &detach_state)); in AssertDetached()
239 pthread_attr_destroy(&attr); in AssertDetached()
643 pthread_rwlockattr_t attr; in TEST() local
644 ASSERT_EQ(0, pthread_rwlockattr_init(&attr)); in TEST()
[all …]
/bionic/libc/kernel/uapi/linux/netfilter/
Dnfnetlink_compat.h36 #define NFA_TYPE(attr) ((attr)->nfa_type & 0x7fff) argument
/bionic/libc/kernel/uapi/linux/
Dcoda.h334 struct coda_vattr attr; member
340 struct coda_vattr attr; member
376 struct coda_vattr attr; member
386 struct coda_vattr attr; member
426 struct coda_vattr attr; member
434 struct coda_vattr attr; member
451 struct coda_vattr attr; member
Dmsdos_fs.h169 __u8 attr; member
185 __u8 attr; member
Dperf_event.h212 #define perf_flags(attr) (* (& (attr)->read_format + 1)) argument
Dfuse.h210 struct fuse_attr attr; member
239 struct fuse_attr attr; member
Dkvm.h914 __u64 attr; member
/bionic/libc/kernel/uapi/rdma/
Dib_user_verbs.h714 struct ib_uverbs_ah_attr attr; member
/bionic/libc/upstream-dlmalloc/
Dmalloc.c2022 pthread_mutexattr_t attr; in pthread_init_lock() local
2023 if (pthread_mutexattr_init(&attr)) return 1; in pthread_init_lock()
2025 if (pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE)) return 1; in pthread_init_lock()
2027 if (pthread_mutex_init(lk, &attr)) return 1; in pthread_init_lock()
2028 if (pthread_mutexattr_destroy(&attr)) return 1; in pthread_init_lock()