/bionic/benchmarks/ |
H A D | semaphore_benchmark.cpp | 97 pthread_attr_t attr; local 98 pthread_attr_init(&attr); 101 pthread_attr_setschedparam(&attr, ¶m); 102 pthread_attr_setschedpolicy(&attr, SCHED_OTHER); 103 pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); 105 pthread_create(&pthread, &attr, BM_semaphore_sem_post_start_thread, &semaphore); 106 pthread_attr_destroy(&attr);
|
/bionic/libc/bionic/ |
H A D | pthread_attr.cpp | 41 int pthread_attr_init(pthread_attr_t* attr) { argument 42 attr->flags = 0; 43 attr->stack_base = NULL; 44 attr->stack_size = PTHREAD_STACK_SIZE_DEFAULT; 45 attr->guard_size = PAGE_SIZE; 46 attr->sched_policy = SCHED_NORMAL; 47 attr->sched_priority = 0; 51 int pthread_attr_destroy(pthread_attr_t* attr) { argument 52 memset(attr, 0x42, sizeof(pthread_attr_t)); 56 int pthread_attr_setdetachstate(pthread_attr_t* attr, in argument 67 pthread_attr_getdetachstate(const pthread_attr_t* attr, int* state) argument 72 pthread_attr_setschedpolicy(pthread_attr_t* attr, int policy) argument 77 pthread_attr_getschedpolicy(const pthread_attr_t* attr, int* policy) argument 82 pthread_attr_setschedparam(pthread_attr_t* attr, const sched_param* param) argument 87 pthread_attr_getschedparam(const pthread_attr_t* attr, sched_param* param) argument 92 pthread_attr_setstacksize(pthread_attr_t* attr, size_t stack_size) argument 100 pthread_attr_getstacksize(const pthread_attr_t* attr, size_t* stack_size) argument 105 pthread_attr_setstack(pthread_attr_t* attr, void* stack_base, size_t stack_size) argument 154 pthread_attr_getstack(const pthread_attr_t* attr, void** stack_base, size_t* stack_size) argument 160 pthread_attr_setguardsize(pthread_attr_t* attr, size_t guard_size) argument 165 pthread_attr_getguardsize(const pthread_attr_t* attr, size_t* guard_size) argument 170 pthread_getattr_np(pthread_t t, pthread_attr_t* attr) argument [all...] |
H A D | pthread_create.cpp | 96 if (__predict_true((thread->attr.flags & PTHREAD_ATTR_FLAG_DETACHED) == 0)) { 103 if (thread->attr.sched_policy != SCHED_NORMAL) { 105 param.sched_priority = thread->attr.sched_priority; 106 if (sched_setscheduler(thread->tid, thread->attr.sched_policy, ¶m) == -1) { 147 static int __allocate_thread(pthread_attr_t* attr, pthread_internal_t** threadp, void** child_stack) { argument 151 if (attr->stack_base == NULL) { 154 mmap_size = BIONIC_ALIGN(attr->stack_size + sizeof(pthread_internal_t), PAGE_SIZE); 155 attr->guard_size = BIONIC_ALIGN(attr->guard_size, PAGE_SIZE); 156 attr 212 pthread_create(pthread_t* thread_out, pthread_attr_t const* attr, void* (*start_routine)(void*), void* arg) argument [all...] |
H A D | pthread_internal.h | 80 pthread_attr_t attr; member in struct:pthread_internal_t
|
H A D | pthread_cond.cpp | 65 #define COND_SET_CLOCK(attr, c) ((attr) | (c << 1)) 67 int pthread_condattr_init(pthread_condattr_t* attr) { argument 68 *attr = 0; 69 *attr |= PTHREAD_PROCESS_PRIVATE; 70 *attr |= (CLOCK_REALTIME << 1); 74 int pthread_condattr_getpshared(const pthread_condattr_t* attr, int* pshared) { argument 75 *pshared = static_cast<int>(COND_IS_SHARED(*attr)); 79 int pthread_condattr_setpshared(pthread_condattr_t* attr, int pshared) { argument 84 *attr | 88 pthread_condattr_getclock(const pthread_condattr_t* attr, clockid_t* clock) argument 93 pthread_condattr_setclock(pthread_condattr_t* attr, clockid_t clock) argument 102 pthread_condattr_destroy(pthread_condattr_t* attr) argument 135 pthread_cond_init(pthread_cond_t* cond_interface, const pthread_condattr_t* attr) argument [all...] |
H A D | pthread_mutex.cpp | 56 int pthread_mutexattr_init(pthread_mutexattr_t *attr) argument 58 *attr = PTHREAD_MUTEX_DEFAULT; 62 int pthread_mutexattr_destroy(pthread_mutexattr_t *attr) argument 64 *attr = -1; 68 int pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int *type_p) argument 70 int type = (*attr & MUTEXATTR_TYPE_MASK); 80 int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type) argument 86 *attr = (*attr & ~MUTEXATTR_TYPE_MASK) | type; 92 int pthread_mutexattr_setpshared(pthread_mutexattr_t *attr, in argument 111 pthread_mutexattr_getpshared(const pthread_mutexattr_t* attr, int* pshared) argument 238 pthread_mutex_init(pthread_mutex_t* mutex_interface, const pthread_mutexattr_t* attr) argument [all...] |
H A D | pthread_rwlock.cpp | 72 static inline __always_inline __always_inline bool __rwlockattr_getpshared(const pthread_rwlockattr_t* attr) { argument 73 return (*attr & RWLOCKATTR_PSHARED_MASK) >> RWLOCKATTR_PSHARED_SHIFT; 76 static inline __always_inline __always_inline void __rwlockattr_setpshared(pthread_rwlockattr_t* attr, int pshared) { argument 77 *attr = (*attr & ~RWLOCKATTR_PSHARED_MASK) | (pshared << RWLOCKATTR_PSHARED_SHIFT); 80 static inline __always_inline int __rwlockattr_getkind(const pthread_rwlockattr_t* attr) { argument 81 return (*attr & RWLOCKATTR_KIND_MASK) >> RWLOCKATTR_KIND_SHIFT; 84 static inline __always_inline void __rwlockattr_setkind(pthread_rwlockattr_t* attr, int kind) { argument 85 *attr = (*attr 89 pthread_rwlockattr_init(pthread_rwlockattr_t* attr) argument 94 pthread_rwlockattr_destroy(pthread_rwlockattr_t* attr) argument 99 pthread_rwlockattr_getpshared(const pthread_rwlockattr_t* attr, int* pshared) argument 108 pthread_rwlockattr_setpshared(pthread_rwlockattr_t* attr, int pshared) argument 121 pthread_rwlockattr_getkind_np(const pthread_rwlockattr_t* attr, int* pref) argument 126 pthread_rwlockattr_setkind_np(pthread_rwlockattr_t* attr, int pref) argument 226 pthread_rwlock_init(pthread_rwlock_t* rwlock_interface, const pthread_rwlockattr_t* attr) argument [all...] |
H A D | ndk_cruft.cpp | 96 extern "C" int pthread_attr_getstackaddr(const pthread_attr_t* attr, void** stack_addr) { argument 99 *stack_addr = (char*)attr->stack_base + attr->stack_size;
|
/bionic/libc/kernel/uapi/linux/ |
H A D | msdos_fs.h | 169 __u8 attr; member in struct:msdos_dir_entry 185 __u8 attr; member in struct:msdos_dir_slot
|
H A D | coda.h | 334 struct coda_vattr attr; member in struct:coda_getattr_out 340 struct coda_vattr attr; member in struct:coda_setattr_in 376 struct coda_vattr attr; member in struct:coda_create_in 386 struct coda_vattr attr; member in struct:coda_create_out 426 struct coda_vattr attr; member in struct:coda_mkdir_in 434 struct coda_vattr attr; member in struct:coda_mkdir_out 451 struct coda_vattr attr; member in struct:coda_symlink_in
|
H A D | fuse.h | 210 struct fuse_attr attr; member in struct:fuse_entry_out 239 struct fuse_attr attr; member in struct:fuse_attr_out
|
H A D | kvm.h | 914 __u64 attr; member in struct:kvm_device_attr
|
/bionic/tests/ |
H A D | pthread_test.cpp | 169 pthread_attr_t attr; local 170 ASSERT_EQ(0, pthread_attr_init(&attr)); 171 ASSERT_EQ(0, pthread_attr_setstack(&attr, stack, stack_size)); 174 ASSERT_EQ(0, pthread_create(&t, &attr, DirtyKeyFn, &key)); 235 pthread_attr_t attr; local 236 ASSERT_EQ(0, pthread_getattr_np(t, &attr)); 238 ASSERT_EQ(0, pthread_attr_getdetachstate(&attr, &detach_state)); 239 pthread_attr_destroy(&attr); 643 pthread_rwlockattr_t attr; local 644 ASSERT_EQ(0, pthread_rwlockattr_init(&attr)); 856 pthread_rwlockattr_t attr; local 986 pthread_attr_t attr; local 995 pthread_condattr_t attr; local 1008 pthread_condattr_t attr; local 1025 pthread_condattr_t attr; local 1313 pthread_mutexattr_t attr; local 1346 pthread_mutexattr_t attr; local [all...] |
/bionic/libc/kernel/uapi/rdma/ |
H A D | ib_user_verbs.h | 714 struct ib_uverbs_ah_attr attr; member in struct:ib_uverbs_create_ah
|
/bionic/libc/upstream-dlmalloc/ |
H A D | malloc.c | 2022 pthread_mutexattr_t attr; local 2023 if (pthread_mutexattr_init(&attr)) return 1; 2025 if (pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE)) return 1; 2027 if (pthread_mutex_init(lk, &attr)) return 1; 2028 if (pthread_mutexattr_destroy(&attr)) return 1;
|