Home
last modified time | relevance | path

Searched refs:attr (Results 1 – 25 of 27) sorted by relevance

12

/bionic/libc/bionic/
Dpthread_attr.cpp45 int pthread_attr_init(pthread_attr_t* attr) { in pthread_attr_init() argument
46 attr->flags = 0; in pthread_attr_init()
47 attr->stack_base = nullptr; in pthread_attr_init()
48 attr->stack_size = PTHREAD_STACK_SIZE_DEFAULT; in pthread_attr_init()
49 attr->guard_size = PTHREAD_GUARD_SIZE; in pthread_attr_init()
50 attr->sched_policy = SCHED_NORMAL; in pthread_attr_init()
51 attr->sched_priority = 0; in pthread_attr_init()
56 int pthread_attr_destroy(pthread_attr_t* attr) { in pthread_attr_destroy() argument
57 memset(attr, 0x42, sizeof(pthread_attr_t)); in pthread_attr_destroy()
62 int pthread_attr_setinheritsched(pthread_attr_t* attr, int flag) { in pthread_attr_setinheritsched() argument
[all …]
Dspawn.cpp139 static void ApplyAttrs(short flags, const posix_spawnattr_t* attr) { in ApplyAttrs() argument
148 if (use_sigdefault && sigismember64(&(*attr)->sigdefault.sigset64, s)) { in ApplyAttrs()
158 if ((flags & POSIX_SPAWN_SETPGROUP) != 0 && setpgid(0, (*attr)->pgroup) == -1) _exit(127); in ApplyAttrs()
164 if (sched_setscheduler(0, (*attr)->schedpolicy, &(*attr)->schedparam) == -1) _exit(127); in ApplyAttrs()
166 if (sched_setparam(0, &(*attr)->schedparam) == -1) _exit(127); in ApplyAttrs()
174 if (sigprocmask64(SIG_SETMASK, &(*attr)->sigmask.sigset64, nullptr)) _exit(127); in ApplyAttrs()
185 const posix_spawnattr_t* attr, in posix_spawn() argument
194 short flags = attr ? (*attr)->flags : 0; in posix_spawn()
202 ApplyAttrs(flags, attr); in posix_spawn()
215 const posix_spawnattr_t* attr, char* const argv[], char* const env[]) { in posix_spawn() argument
[all …]
Dpthread_cond.cpp65 #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 …]
Dpthread_rwlock.cpp72 static 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 static inline __always_inline void __rwlockattr_setpshared(pthread_rwlockattr_t* attr, in __rwlockattr_setpshared() argument
78 *attr = (*attr & ~RWLOCKATTR_PSHARED_MASK) | (pshared << RWLOCKATTR_PSHARED_SHIFT); in __rwlockattr_setpshared()
81 static inline __always_inline int __rwlockattr_getkind(const pthread_rwlockattr_t* attr) { in __rwlockattr_getkind() argument
82 return (*attr & RWLOCKATTR_KIND_MASK) >> RWLOCKATTR_KIND_SHIFT; in __rwlockattr_getkind()
85 static inline __always_inline void __rwlockattr_setkind(pthread_rwlockattr_t* attr, int kind) { in __rwlockattr_setkind() argument
86 *attr = (*attr & ~RWLOCKATTR_KIND_MASK) | (kind << RWLOCKATTR_KIND_SHIFT); in __rwlockattr_setkind()
90 int pthread_rwlockattr_init(pthread_rwlockattr_t* attr) { in pthread_rwlockattr_init() argument
91 *attr = 0; in pthread_rwlockattr_init()
[all …]
Dpthread_barrier.cpp35 int pthread_barrierattr_init(pthread_barrierattr_t* attr) { in pthread_barrierattr_init() argument
36 *attr = 0; in pthread_barrierattr_init()
40 int pthread_barrierattr_destroy(pthread_barrierattr_t* attr) { in pthread_barrierattr_destroy() argument
41 *attr = 0; in pthread_barrierattr_destroy()
45 int pthread_barrierattr_getpshared(const pthread_barrierattr_t* attr, int* pshared) { in pthread_barrierattr_getpshared() argument
46 *pshared = (*attr & 1) ? PTHREAD_PROCESS_SHARED : PTHREAD_PROCESS_PRIVATE; in pthread_barrierattr_getpshared()
50 int pthread_barrierattr_setpshared(pthread_barrierattr_t* attr, int pshared) { in pthread_barrierattr_setpshared() argument
52 *attr |= 1; in pthread_barrierattr_setpshared()
54 *attr &= ~1; in pthread_barrierattr_setpshared()
91 int pthread_barrier_init(pthread_barrier_t* barrier_interface, const pthread_barrierattr_t* attr, in pthread_barrier_init() argument
[all …]
Dpthread_create.cpp158 if (__predict_true((thread->attr.flags & PTHREAD_ATTR_FLAG_DETACHED) == 0)) { in __init_thread()
168 if ((thread->attr.flags & PTHREAD_ATTR_FLAG_INHERIT) != 0) { in __init_thread()
184 policy = thread->attr.sched_policy; in __init_thread()
185 param.sched_priority = thread->attr.sched_priority; in __init_thread()
189 if ((thread->attr.flags & (PTHREAD_ATTR_FLAG_INHERIT|PTHREAD_ATTR_FLAG_EXPLICIT)) == 0) { in __init_thread()
190 need_set = (thread->attr.sched_policy != SCHED_NORMAL); in __init_thread()
265 static int __allocate_thread(pthread_attr_t* attr, bionic_tcb** tcbp, void** child_stack) { in __allocate_thread() argument
270 if (attr->stack_base == nullptr) { in __allocate_thread()
274 const size_t unaligned_guard_size = attr->guard_size; in __allocate_thread()
275 attr->guard_size = __BIONIC_ALIGN(attr->guard_size, page_size()); in __allocate_thread()
[all …]
Dpthread_mutex.cpp62 int pthread_mutexattr_init(pthread_mutexattr_t *attr) in pthread_mutexattr_init() argument
64 *attr = PTHREAD_MUTEX_DEFAULT; in pthread_mutexattr_init()
68 int pthread_mutexattr_destroy(pthread_mutexattr_t *attr) in pthread_mutexattr_destroy() argument
70 *attr = -1; in pthread_mutexattr_destroy()
74 int pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int *type_p) in pthread_mutexattr_gettype() argument
76 int type = (*attr & MUTEXATTR_TYPE_MASK); in pthread_mutexattr_gettype()
86 int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type) in pthread_mutexattr_settype() argument
92 *attr = (*attr & ~MUTEXATTR_TYPE_MASK) | type; in pthread_mutexattr_settype()
98 int pthread_mutexattr_setpshared(pthread_mutexattr_t *attr, int pshared) in pthread_mutexattr_setpshared() argument
102 *attr &= ~MUTEXATTR_SHARED_MASK; in pthread_mutexattr_setpshared()
[all …]
D__libc_init_main_thread.cpp127 pthread_attr_init(&main_thread.attr); in __libc_init_main_thread_late()
129 pthread_attr_setinheritsched(&main_thread.attr, PTHREAD_INHERIT_SCHED); in __libc_init_main_thread_late()
131 pthread_attr_setguardsize(&main_thread.attr, 0); in __libc_init_main_thread_late()
133 pthread_attr_setstacksize(&main_thread.attr, 0); in __libc_init_main_thread_late()
Dndk_cruft.cpp100 int pthread_attr_getstackaddr(const pthread_attr_t* attr, void** stack_addr) { in pthread_attr_getstackaddr() argument
103 *stack_addr = (char*)attr->stack_base + attr->stack_size; in pthread_attr_getstackaddr()
Dpthread_internal.h97 pthread_attr_t attr; variable
/bionic/tests/
Dpthread_test.cpp174 pthread_attr_t attr; in TEST() local
175 ASSERT_EQ(0, pthread_attr_init(&attr)); in TEST()
176 ASSERT_EQ(0, pthread_attr_setstack(&attr, stack, stack_size)); in TEST()
179 ASSERT_EQ(0, pthread_create(&t, &attr, DirtyKeyFn, &key)); in TEST()
202 pthread_attr_t attr; in TEST() local
203 ASSERT_EQ(0, pthread_attr_init(&attr)); in TEST()
204 ASSERT_EQ(0, pthread_attr_setstack(&attr, stack.get(), stack_size)); in TEST()
207 ASSERT_EQ(0, pthread_create(&t, &attr, FnWithStackFrame, nullptr)); in TEST()
266 pthread_attr_t attr; in AssertDetached() local
267 ASSERT_EQ(0, pthread_getattr_np(t, &attr)); in AssertDetached()
[all …]
Dandroid_unsafe_frame_pointer_chase_test.cpp140 pthread_attr_t attr; in TEST() local
141 ASSERT_EQ(0, pthread_attr_init(&attr)); in TEST()
142 ASSERT_EQ(0, pthread_attr_setstack(&attr, reinterpret_cast<char*>(stacks) + kStackSize * i, in TEST()
145 ASSERT_EQ(0, pthread_create(&t, &attr, SignalBacktraceThread, in TEST()
Dstruct_layout_test.cpp37 CHECK_OFFSET(pthread_internal_t, attr, 24); in tests()
79 CHECK_OFFSET(pthread_internal_t, attr, 16); in tests()
/bionic/benchmarks/
Dpthread_benchmark.cpp107 pthread_mutexattr_t attr; in PIMutex() local
108 pthread_mutexattr_init(&attr); in PIMutex()
109 pthread_mutexattr_settype(&attr, type); in PIMutex()
110 pthread_mutexattr_setprotocol(&attr, PTHREAD_PRIO_INHERIT); in PIMutex()
111 pthread_mutex_init(&mutex, &attr); in PIMutex()
112 pthread_mutexattr_destroy(&attr); in PIMutex()
/bionic/libc/kernel/uapi/linux/
Dcoda.h254 struct coda_vattr attr; member
259 struct coda_vattr attr; member
288 struct coda_vattr attr; member
296 struct coda_vattr attr; member
328 struct coda_vattr attr; member
334 struct coda_vattr attr; member
348 struct coda_vattr attr; member
Dmsdos_fs.h127 __u8 attr; member
140 __u8 attr; member
Dtee.h58 __u64 attr; member
Dgpio.h54 struct gpio_v2_line_attribute attr; member
Dfuse.h240 struct fuse_attr attr; member
263 struct fuse_attr attr; member
Dacrn.h146 __u32 attr; member
/bionic/libc/kernel/uapi/linux/netfilter/
Dnfnetlink_compat.h21 #define NFA_TYPE(attr) ((attr)->nfa_type & 0x7fff) argument
/bionic/libc/
DSECCOMP_ALLOWLIST_SYSTEM.TXT6 int bpf(int cmd, union bpf_attr *attr, unsigned int size) all
/bionic/libc/kernel/uapi/misc/
Dfastrpc.h44 __u32 attr; member
/bionic/tools/versioner/src/
DDeclarationDatabase.cpp147 for (const AnnotateAttr* attr : decl->specific_attrs<AnnotateAttr>()) { in VisitDeclaratorDecl() local
148 llvm::StringRef annotation = attr->getAnnotation(); in VisitDeclaratorDecl()
/bionic/libc/malloc_debug/
Dmalloc_debug.cpp218 pthread_rwlockattr_t attr; in Init() local
221 pthread_rwlockattr_setkind_np(&attr, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP); in Init()
222 pthread_rwlock_init(&lock_, &attr); in Init()

12