/bionic/libc/bionic/ |
D | pthread_attr.cpp | 41 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 …]
|
D | pthread_cond.cpp | 65 #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 …]
|
D | pthread_create.cpp | 96 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, ¶m) == -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 …]
|
D | pthread_rwlock.cpp | 72 …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 …]
|
D | pthread_mutex.cpp | 56 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 …]
|
D | libc_init_common.cpp | 94 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()
|
D | ndk_cruft.cpp | 96 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()
|
D | pthread_internal.cpp | 73 munmap(thread->attr.stack_base, thread->mmap_size); in __pthread_internal_free()
|
D | pthread_internal.h | 80 pthread_attr_t attr; member
|
D | pthread_exit.cpp | 119 _exit_with_stack_teardown(thread->attr.stack_base, thread->mmap_size); in pthread_exit()
|
/bionic/libc/stdio/ |
D | fileext.h | 64 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/ |
D | semaphore_benchmark.cpp | 97 pthread_attr_t attr; in Run() local 98 pthread_attr_init(&attr); in Run() 101 pthread_attr_setschedparam(&attr, ¶m); 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/ |
D | pthread_test.cpp | 169 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/ |
D | nfnetlink_compat.h | 36 #define NFA_TYPE(attr) ((attr)->nfa_type & 0x7fff) argument
|
/bionic/libc/kernel/uapi/linux/ |
D | coda.h | 334 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
|
D | msdos_fs.h | 169 __u8 attr; member 185 __u8 attr; member
|
D | perf_event.h | 212 #define perf_flags(attr) (* (& (attr)->read_format + 1)) argument
|
D | fuse.h | 210 struct fuse_attr attr; member 239 struct fuse_attr attr; member
|
D | kvm.h | 914 __u64 attr; member
|
/bionic/libc/kernel/uapi/rdma/ |
D | ib_user_verbs.h | 714 struct ib_uverbs_ah_attr attr; member
|
/bionic/libc/upstream-dlmalloc/ |
D | malloc.c | 2022 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()
|