/bionic/libc/bionic/ |
D | pthread_attr.cpp | 44 int pthread_attr_init(pthread_attr_t* attr) { in pthread_attr_init() argument 45 attr->flags = 0; in pthread_attr_init() 46 attr->stack_base = nullptr; in pthread_attr_init() 47 attr->stack_size = PTHREAD_STACK_SIZE_DEFAULT; in pthread_attr_init() 48 attr->guard_size = PTHREAD_GUARD_SIZE; in pthread_attr_init() 49 attr->sched_policy = SCHED_NORMAL; in pthread_attr_init() 50 attr->sched_priority = 0; in pthread_attr_init() 55 int pthread_attr_destroy(pthread_attr_t* attr) { in pthread_attr_destroy() argument 56 memset(attr, 0x42, sizeof(pthread_attr_t)); in pthread_attr_destroy() 61 int pthread_attr_setinheritsched(pthread_attr_t* attr, int flag) { in pthread_attr_setinheritsched() argument [all …]
|
D | spawn.cpp | 97 static void ApplyAttrs(short flags, const posix_spawnattr_t* attr) { in ApplyAttrs() argument 106 if (use_sigdefault && sigismember64(&(*attr)->sigdefault.sigset64, s)) { in ApplyAttrs() 116 if ((flags & POSIX_SPAWN_SETPGROUP) != 0 && setpgid(0, (*attr)->pgroup) == -1) _exit(127); in ApplyAttrs() 122 if (sched_setscheduler(0, (*attr)->schedpolicy, &(*attr)->schedparam) == -1) _exit(127); in ApplyAttrs() 124 if (sched_setparam(0, &(*attr)->schedparam) == -1) _exit(127); in ApplyAttrs() 132 if (sigprocmask64(SIG_SETMASK, &(*attr)->sigmask.sigset64, nullptr)) _exit(127); in ApplyAttrs() 139 const posix_spawnattr_t* attr, in posix_spawn() argument 148 short flags = attr ? (*attr)->flags : 0; in posix_spawn() 156 ApplyAttrs(flags, attr); in posix_spawn() 169 const posix_spawnattr_t* attr, char* const argv[], char* const env[]) { in posix_spawn() argument [all …]
|
D | pthread_cond.cpp | 65 #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 …]
|
D | pthread_rwlock.cpp | 72 …ne __always_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 …ways_inline __always_inline void __rwlockattr_setpshared(pthread_rwlockattr_t* attr, int pshared) { in __rwlockattr_setpshared() argument 77 *attr = (*attr & ~RWLOCKATTR_PSHARED_MASK) | (pshared << RWLOCKATTR_PSHARED_SHIFT); in __rwlockattr_setpshared() 80 static inline __always_inline int __rwlockattr_getkind(const pthread_rwlockattr_t* attr) { in __rwlockattr_getkind() argument 81 return (*attr & RWLOCKATTR_KIND_MASK) >> RWLOCKATTR_KIND_SHIFT; in __rwlockattr_getkind() 84 static inline __always_inline void __rwlockattr_setkind(pthread_rwlockattr_t* attr, int kind) { in __rwlockattr_setkind() argument 85 *attr = (*attr & ~RWLOCKATTR_KIND_MASK) | (kind << RWLOCKATTR_KIND_SHIFT); in __rwlockattr_setkind() 89 int pthread_rwlockattr_init(pthread_rwlockattr_t* attr) { in pthread_rwlockattr_init() argument 90 *attr = 0; in pthread_rwlockattr_init() [all …]
|
D | pthread_barrier.cpp | 35 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 …]
|
D | pthread_create.cpp | 145 if (__predict_true((thread->attr.flags & PTHREAD_ATTR_FLAG_DETACHED) == 0)) { in __init_thread() 155 if ((thread->attr.flags & PTHREAD_ATTR_FLAG_INHERIT) != 0) { in __init_thread() 172 policy = thread->attr.sched_policy; in __init_thread() 173 param.sched_priority = thread->attr.sched_priority; in __init_thread() 177 if ((thread->attr.flags & (PTHREAD_ATTR_FLAG_INHERIT|PTHREAD_ATTR_FLAG_EXPLICIT)) == 0) { in __init_thread() 178 need_set = (thread->attr.sched_policy != SCHED_NORMAL); in __init_thread() 248 static int __allocate_thread(pthread_attr_t* attr, bionic_tcb** tcbp, void** child_stack) { in __allocate_thread() argument 253 if (attr->stack_base == nullptr) { in __allocate_thread() 257 const size_t unaligned_guard_size = attr->guard_size; in __allocate_thread() 258 attr->guard_size = __BIONIC_ALIGN(attr->guard_size, PAGE_SIZE); in __allocate_thread() [all …]
|
D | pthread_mutex.cpp | 62 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.cpp | 127 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()
|
D | ndk_cruft.cpp | 100 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()
|
D | pthread_internal.h | 95 pthread_attr_t attr; variable
|
/bionic/tests/ |
D | pthread_test.cpp | 171 pthread_attr_t attr; in TEST() local 172 ASSERT_EQ(0, pthread_attr_init(&attr)); in TEST() 173 ASSERT_EQ(0, pthread_attr_setstack(&attr, stack, stack_size)); in TEST() 176 ASSERT_EQ(0, pthread_create(&t, &attr, DirtyKeyFn, &key)); in TEST() 239 pthread_attr_t attr; in AssertDetached() local 240 ASSERT_EQ(0, pthread_getattr_np(t, &attr)); in AssertDetached() 242 ASSERT_EQ(0, pthread_attr_getdetachstate(&attr, &detach_state)); in AssertDetached() 243 pthread_attr_destroy(&attr); in AssertDetached() 836 pthread_rwlockattr_t attr; in TEST() local 837 ASSERT_EQ(0, pthread_rwlockattr_init(&attr)); in TEST() [all …]
|
D | android_unsafe_frame_pointer_chase_test.cpp | 140 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()
|
D | struct_layout_test.cpp | 37 CHECK_OFFSET(pthread_internal_t, attr, 24); in tests() 78 CHECK_OFFSET(pthread_internal_t, attr, 16); in tests()
|
/bionic/benchmarks/ |
D | pthread_benchmark.cpp | 103 pthread_mutexattr_t attr; in PIMutex() local 104 pthread_mutexattr_init(&attr); in PIMutex() 105 pthread_mutexattr_settype(&attr, type); in PIMutex() 106 pthread_mutexattr_setprotocol(&attr, PTHREAD_PRIO_INHERIT); in PIMutex() 107 pthread_mutex_init(&mutex, &attr); in PIMutex() 108 pthread_mutexattr_destroy(&attr); in PIMutex()
|
/bionic/libc/kernel/uapi/linux/ |
D | coda.h | 266 struct coda_vattr attr; member 271 struct coda_vattr attr; member 300 struct coda_vattr attr; member 308 struct coda_vattr attr; member 340 struct coda_vattr attr; member 346 struct coda_vattr attr; member 360 struct coda_vattr attr; member
|
D | msdos_fs.h | 139 __u8 attr; member 152 __u8 attr; member
|
D | tee.h | 72 __u64 attr; member
|
D | gpio.h | 65 struct gpio_v2_line_attribute attr; member
|
D | fuse.h | 200 struct fuse_attr attr; member 223 struct fuse_attr attr; member
|
D | acrn.h | 159 __u32 attr; member
|
/bionic/libc/kernel/uapi/linux/netfilter/ |
D | nfnetlink_compat.h | 33 #define NFA_TYPE(attr) ((attr)->nfa_type & 0x7fff) argument
|
/bionic/libc/ |
D | SECCOMP_ALLOWLIST_SYSTEM.TXT | 6 int bpf(int cmd, union bpf_attr *attr, unsigned int size) all
|
D | SECCOMP_ALLOWLIST_COMMON.TXT | 22 int perf_event_open:perf_event_open(struct perf_event_attr *attr, pid_t pid, int cpu, int group_fd,… 46 int sched_getattr(pid_t pid, struct sched_attr* attr, unsigned int flags) all 47 int sched_setattr(pid_t pid, struct sched_attr* attr, unsigned int size, unsigned int flags) all
|
/bionic/tools/versioner/src/ |
D | DeclarationDatabase.cpp | 147 for (const AnnotateAttr* attr : decl->specific_attrs<AnnotateAttr>()) { in VisitDeclaratorDecl() local 148 llvm::StringRef annotation = attr->getAnnotation(); in VisitDeclaratorDecl()
|
/bionic/libc/malloc_debug/ |
D | malloc_debug.cpp | 121 pthread_rwlockattr_t attr; in Init() local 124 pthread_rwlockattr_setkind_np(&attr, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP); in Init() 125 pthread_rwlock_init(&lock_, &attr); in Init()
|