Searched refs:attr (Results 1 - 22 of 22) sorted by relevance

/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
183 pthread_attr_getstack(const pthread_attr_t* attr, void** stack_base, size_t* stack_size) argument
189 pthread_attr_setguardsize(pthread_attr_t* attr, size_t guard_size) argument
194 pthread_attr_getguardsize(const pthread_attr_t* attr, size_t* guard_size) argument
199 pthread_getattr_np(pthread_t t, pthread_attr_t* attr) argument
[all...]
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 D__libc_init_main_thread.cpp75 pthread_attr_init(&main_thread.attr);
76 main_thread.attr.guard_size = 0; // The main thread has no guard page.
77 main_thread.attr.stack_size = 0; // User code should never see this; we'll compute it when asked.
H A Dpthread_barrier.cpp35 int pthread_barrierattr_init(pthread_barrierattr_t* attr) { argument
36 *attr = 0;
40 int pthread_barrierattr_destroy(pthread_barrierattr_t* attr) { argument
41 *attr = 0;
45 int pthread_barrierattr_getpshared(pthread_barrierattr_t* attr, int* pshared) { argument
46 *pshared = (*attr & 1) ? PTHREAD_PROCESS_SHARED : PTHREAD_PROCESS_PRIVATE;
50 int pthread_barrierattr_setpshared(pthread_barrierattr_t* attr, int pshared) { argument
52 *attr |= 1;
54 *attr &= ~1;
91 int pthread_barrier_init(pthread_barrier_t* barrier_interface, const pthread_barrierattr_t* attr, argument
[all...]
H A Dpthread_create.cpp90 if (__predict_true((thread->attr.flags & PTHREAD_ATTR_FLAG_DETACHED) == 0)) {
97 if (thread->attr.sched_policy != SCHED_NORMAL) {
99 param.sched_priority = thread->attr.sched_priority;
100 if (sched_setscheduler(thread->tid, thread->attr.sched_policy, &param) == -1) {
142 static int __allocate_thread(pthread_attr_t* attr, pthread_internal_t** threadp, void** child_stack) { argument
146 if (attr->stack_base == NULL) {
149 mmap_size = BIONIC_ALIGN(attr->stack_size + sizeof(pthread_internal_t), PAGE_SIZE);
150 attr->guard_size = BIONIC_ALIGN(attr->guard_size, PAGE_SIZE);
151 attr
211 pthread_create(pthread_t* thread_out, pthread_attr_t const* attr, void* (*start_routine)(void*), void* arg) 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 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
241 pthread_mutex_init(pthread_mutex_t* mutex_interface, const pthread_mutexattr_t* attr) argument
[all...]
H A Dpthread_internal.cpp73 munmap(thread->attr.stack_base, thread->mmap_size);
H A Dpthread_exit.cpp119 _exit_with_stack_teardown(thread->attr.stack_base, thread->mmap_size);
H A Dpthread_internal.h85 pthread_attr_t attr; member in class:pthread_internal_t
H A Dndk_cruft.cpp96 int pthread_attr_getstackaddr(const pthread_attr_t* attr, void** stack_addr) { argument
99 *stack_addr = (char*)attr->stack_base + attr->stack_size;
/bionic/benchmarks/
H A Dsemaphore_benchmark.cpp85 pthread_attr_t attr; local
86 pthread_attr_init(&attr);
89 pthread_attr_setschedparam(&attr, &param);
90 pthread_attr_setschedpolicy(&attr, SCHED_OTHER);
91 pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
93 pthread_create(&pthread, &attr, BM_semaphore_sem_post_start_thread, &semaphore);
94 pthread_attr_destroy(&attr);
/bionic/libc/kernel/uapi/linux/netfilter/
H A Dnfnetlink_compat.h36 #define NFA_TYPE(attr) ((attr)->nfa_type & 0x7fff)
/bionic/tests/
H A Dpthread_test.cpp163 pthread_attr_t attr; local
164 ASSERT_EQ(0, pthread_attr_init(&attr));
165 ASSERT_EQ(0, pthread_attr_setstack(&attr, stack, stack_size));
168 ASSERT_EQ(0, pthread_create(&t, &attr, DirtyKeyFn, &key));
229 pthread_attr_t attr; local
230 ASSERT_EQ(0, pthread_getattr_np(t, &attr));
232 ASSERT_EQ(0, pthread_attr_getdetachstate(&attr, &detach_state));
233 pthread_attr_destroy(&attr);
641 pthread_rwlockattr_t attr; local
642 ASSERT_EQ(0, pthread_rwlockattr_init(&attr));
924 pthread_rwlockattr_t attr; local
1053 pthread_attr_t attr; local
1062 pthread_condattr_t attr; local
1075 pthread_condattr_t attr; local
1092 pthread_condattr_t attr; local
1137 pthread_condattr_t attr; local
1332 pthread_attr_t attr; local
1364 pthread_attr_t attr; local
1490 pthread_mutexattr_t attr; local
1523 pthread_mutexattr_t attr; local
1810 pthread_barrierattr_t attr; local
[all...]
/bionic/libc/kernel/uapi/linux/
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 Dmsdos_fs.h169 __u8 attr; member in struct:msdos_dir_entry
185 __u8 attr; member in struct:msdos_dir_slot
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 Dperf_event.h246 #define perf_flags(attr) (* (& (attr)->read_format + 1))
H A Dkvm.h985 __u64 attr; member in struct:kvm_device_attr
/bionic/libc/stdio/
H A Dlocal.h164 pthread_mutexattr_t attr; \
165 pthread_mutexattr_init(&attr); \
166 pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); \
167 pthread_mutex_init(&_FLOCK(fp), &attr); \
168 pthread_mutexattr_destroy(&attr); \
/bionic/libc/include/
H A Dpthread.h231 int pthread_barrierattr_init(pthread_barrierattr_t* attr) __nonnull((1));
232 int pthread_barrierattr_destroy(pthread_barrierattr_t* attr) __nonnull((1));
233 int pthread_barrierattr_getpshared(pthread_barrierattr_t* attr, int* pshared) __nonnull((1, 2));
234 int pthread_barrierattr_setpshared(pthread_barrierattr_t* attr, int pshared) __nonnull((1));
/bionic/libc/kernel/uapi/rdma/
H A Dib_user_verbs.h790 struct ib_uverbs_ah_attr attr; member in struct:ib_uverbs_create_ah

Completed in 28 milliseconds