Home
last modified time | relevance | path

Searched refs:attr (Results 1 – 22 of 22) 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_create.cpp82 if (thread->attr.sched_policy != SCHED_NORMAL) { in __init_thread()
84 param.sched_priority = thread->attr.sched_priority; in __init_thread()
85 if (sched_setscheduler(thread->tid, thread->attr.sched_policy, &param) == -1) { in __init_thread()
108 void* stack = mmap(NULL, thread->attr.stack_size, prot, flags, -1, 0); in __create_thread_stack()
113 thread->attr.stack_size, strerror(errno)); in __create_thread_stack()
118 if (mprotect(stack, thread->attr.guard_size, PROT_NONE) == -1) { in __create_thread_stack()
121 thread->attr.guard_size, strerror(errno)); in __create_thread_stack()
122 munmap(stack, thread->attr.stack_size); in __create_thread_stack()
154 int pthread_create(pthread_t* thread_out, pthread_attr_t const* attr, in pthread_create() argument
167 if (attr == NULL) { in pthread_create()
[all …]
Dpthread_cond.cpp58 #define COND_SET_CLOCK(attr, c) ((attr) | (c << 1)) argument
61 int pthread_condattr_init(pthread_condattr_t* attr) { in pthread_condattr_init() argument
62 *attr = 0; in pthread_condattr_init()
63 *attr |= PTHREAD_PROCESS_PRIVATE; in pthread_condattr_init()
64 *attr |= (CLOCK_REALTIME << 1); in pthread_condattr_init()
68 int pthread_condattr_getpshared(const pthread_condattr_t* attr, int* pshared) { in pthread_condattr_getpshared() argument
69 *pshared = static_cast<int>(COND_IS_SHARED(*attr)); in pthread_condattr_getpshared()
73 int pthread_condattr_setpshared(pthread_condattr_t* attr, int pshared) { in pthread_condattr_setpshared() argument
78 *attr |= pshared; in pthread_condattr_setpshared()
82 int pthread_condattr_getclock(const pthread_condattr_t* attr, clockid_t* clock) { in pthread_condattr_getclock() argument
[all …]
Dpthread_rwlock.cpp69 return rwlock->attr == PTHREAD_PROCESS_SHARED; in rwlock_is_shared()
81 int pthread_rwlockattr_init(pthread_rwlockattr_t* attr) { in pthread_rwlockattr_init() argument
82 *attr = PTHREAD_PROCESS_PRIVATE; in pthread_rwlockattr_init()
86 int pthread_rwlockattr_destroy(pthread_rwlockattr_t* attr) { in pthread_rwlockattr_destroy() argument
87 *attr = -1; in pthread_rwlockattr_destroy()
91 int pthread_rwlockattr_setpshared(pthread_rwlockattr_t* attr, int pshared) { in pthread_rwlockattr_setpshared() argument
95 *attr = pshared; in pthread_rwlockattr_setpshared()
102 int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t* attr, int* pshared) { in pthread_rwlockattr_getpshared() argument
103 *pshared = *attr; in pthread_rwlockattr_getpshared()
107 int pthread_rwlock_init(pthread_rwlock_t* rwlock, const pthread_rwlockattr_t* attr) { in pthread_rwlock_init() argument
[all …]
Dpthread_detach.cpp39 if (thread->attr.flags & PTHREAD_ATTR_FLAG_DETACHED) { in pthread_detach()
43 if (thread->attr.flags & PTHREAD_ATTR_FLAG_JOINED) { in pthread_detach()
53 thread->attr.flags |= PTHREAD_ATTR_FLAG_DETACHED; in pthread_detach()
Dpthread_join.cpp47 if ((thread->attr.flags & PTHREAD_ATTR_FLAG_DETACHED) != 0) { in pthread_join()
51 if ((thread->attr.flags & PTHREAD_ATTR_FLAG_JOINED) != 0) { in pthread_join()
56 thread->attr.flags |= PTHREAD_ATTR_FLAG_JOINED; in pthread_join()
Dpthread_exit.cpp91 void* stack_base = thread->attr.stack_base; in pthread_exit()
92 size_t stack_size = thread->attr.stack_size; in pthread_exit()
96 if ((thread->attr.flags & PTHREAD_ATTR_FLAG_DETACHED) != 0) { in pthread_exit()
106 thread->attr.stack_base = NULL; in pthread_exit()
107 thread->attr.stack_size = 0; in pthread_exit()
Dpthread_mutex.cpp206 int pthread_mutexattr_init(pthread_mutexattr_t *attr) in pthread_mutexattr_init() argument
208 *attr = PTHREAD_MUTEX_DEFAULT; in pthread_mutexattr_init()
212 int pthread_mutexattr_destroy(pthread_mutexattr_t *attr) in pthread_mutexattr_destroy() argument
214 *attr = -1; in pthread_mutexattr_destroy()
218 int pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int *type_p) in pthread_mutexattr_gettype() argument
220 int type = (*attr & MUTEXATTR_TYPE_MASK); in pthread_mutexattr_gettype()
230 int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type) in pthread_mutexattr_settype() argument
236 *attr = (*attr & ~MUTEXATTR_TYPE_MASK) | type; in pthread_mutexattr_settype()
242 int pthread_mutexattr_setpshared(pthread_mutexattr_t *attr, int pshared) in pthread_mutexattr_setpshared() argument
246 *attr &= ~MUTEXATTR_SHARED_MASK; in pthread_mutexattr_setpshared()
[all …]
Dlibc_init_common.cpp90 pthread_attr_init(&main_thread.attr); in __libc_init_tls()
91 main_thread.attr.flags = PTHREAD_ATTR_FLAG_USER_ALLOCATED_STACK | PTHREAD_ATTR_FLAG_MAIN_THREAD; in __libc_init_tls()
92 main_thread.attr.guard_size = 0; // The main thread has no guard page. in __libc_init_tls()
93 main_thread.attr.stack_size = 0; // User code should never see this; we'll compute it when asked. in __libc_init_tls()
Dpthread_internal.h72 return (attr.flags & PTHREAD_ATTR_FLAG_USER_ALLOCATED_STACK) != 0; in user_allocated_stack()
77 pthread_attr_t attr; member
Dndk_cruft.cpp91 extern "C" int pthread_attr_getstackaddr(const pthread_attr_t* attr, void** stack_addr) { in pthread_attr_getstackaddr() argument
94 *stack_addr = (char*)attr->stack_base + attr->stack_size; in pthread_attr_getstackaddr()
Dpthread_internals.cpp50 if ((thread->attr.flags & PTHREAD_ATTR_FLAG_MAIN_THREAD) == 0) { in _pthread_internal_remove_locked()
/bionic/tests/
Dpthread_test.cpp124 pthread_attr_t attr; in TEST() local
125 ASSERT_EQ(0, pthread_attr_init(&attr)); in TEST()
126 ASSERT_EQ(0, pthread_attr_setstack(&attr, stack, stack_size)); in TEST()
129 ASSERT_EQ(0, pthread_create(&t, &attr, DirtyKeyFn, &key)); in TEST()
159 pthread_attr_t attr; in AssertDetached() local
160 ASSERT_EQ(0, pthread_getattr_np(t, &attr)); in AssertDetached()
162 ASSERT_EQ(0, pthread_attr_getdetachstate(&attr, &detach_state)); in AssertDetached()
163 pthread_attr_destroy(&attr); in AssertDetached()
416 pthread_attr_t attr; in TEST() local
417 ASSERT_EQ(0, pthread_attr_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.h321 struct coda_vattr attr; member
327 struct coda_vattr attr; member
364 struct coda_vattr attr; member
374 struct coda_vattr attr; member
414 struct coda_vattr attr; member
421 struct coda_vattr attr; member
439 struct coda_vattr attr; member
Dmsdos_fs.h169 __u8 attr; member
185 __u8 attr; member
Dperf_event.h240 #define perf_flags(attr) (*(&(attr)->read_format + 1)) argument
Dfuse.h205 struct fuse_attr attr; member
234 struct fuse_attr attr; member
Dkvm.h807 __u64 attr; member
/bionic/libc/include/
Dpthread.h105 int32_t attr; member
/bionic/libc/kernel/uapi/rdma/
Dib_user_verbs.h696 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()