Searched defs:attr (Results 1 - 15 of 15) sorted by relevance

/bionic/benchmarks/
H A Dsemaphore_benchmark.cpp97 pthread_attr_t attr; local
98 pthread_attr_init(&attr);
101 pthread_attr_setschedparam(&attr, &param);
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 Dpthread_attr.cpp41 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 Dpthread_create.cpp96 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, &param) == -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 Dpthread_internal.h80 pthread_attr_t attr; member in struct:pthread_internal_t
H A Dpthread_cond.cpp65 #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 Dpthread_mutex.cpp56 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 Dpthread_rwlock.cpp72 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 Dndk_cruft.cpp96 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 Dmsdos_fs.h169 __u8 attr; member in struct:msdos_dir_entry
185 __u8 attr; member in struct:msdos_dir_slot
H A Dcoda.h334 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 Dfuse.h210 struct fuse_attr attr; member in struct:fuse_entry_out
239 struct fuse_attr attr; member in struct:fuse_attr_out
H A Dkvm.h914 __u64 attr; member in struct:kvm_device_attr
/bionic/tests/
H A Dpthread_test.cpp169 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 Dib_user_verbs.h714 struct ib_uverbs_ah_attr attr; member in struct:ib_uverbs_create_ah
/bionic/libc/upstream-dlmalloc/
H A Dmalloc.c2022 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;

Completed in 712 milliseconds