Home
last modified time | relevance | path

Searched refs:__predict_true (Results 1 – 16 of 16) sorted by relevance

/aosp12/system/core/libutils/include/utils/
H A DFastStrcmp.h23 #ifndef __predict_true
24 #define __predict_true(exp) __builtin_expect((exp) != 0, 1) macro
45 return __predict_true(n > 0) && in fastcmp()
46 ((*l != *r) || (__predict_true(n > 1) && cmp(l + 1, r + 1, n - 1))); in fastcmp()
52 return __predict_true(n > 0) && in fasticmp()
53 ((tolower(*l) != tolower(*r)) || (__predict_true(n > 1) && cmp(l + 1, r + 1, n - 1))); in fasticmp()
61 return __predict_true(n > 0) && in fastcmp()
62 ((*l != *r) || (__predict_true(n > 1) && cmp(l + 1, r + 1, n - 1))); in fastcmp()
67 return (*l != *r) || (__predict_true(*l) && cmp(l + 1, r + 1)); in fastcmp()
72 return (tolower(*l) != tolower(*r)) || (__predict_true(*l) && cmp(l + 1, r + 1)); in fasticmp()
/aosp12/bionic/libc/bionic/
H A Dpthread_mutex.cpp181 if (__predict_true(ret == 0)) { in PIMutexTimedLock()
195 if (__predict_true(mutex.type == PTHREAD_MUTEX_NORMAL)) { in PIMutexUnlock()
506 if (__predict_true(attr == nullptr)) { in pthread_mutex_init()
584 if (__predict_true(NormalMutexTryLock(mutex, shared) == 0)) { in NormalMutexLock()
718 if ( __predict_true(mtype == MUTEX_TYPE_BITS_NORMAL) ) { in MutexLockWithTimeout()
822 if (__predict_true(mtype == MUTEX_TYPE_BITS_NORMAL)) { in pthread_mutex_lock()
824 if (__predict_true(NonPI::NormalMutexTryLock(mutex, shared) == 0)) { in pthread_mutex_lock()
831 if (__predict_true(PIMutexTryLock(m) == 0)) { in pthread_mutex_lock()
858 if (__predict_true(mtype == MUTEX_TYPE_BITS_NORMAL)) { in pthread_mutex_unlock()
907 if (__predict_true(mtype == MUTEX_TYPE_BITS_NORMAL)) { in pthread_mutex_trylock()
[all …]
H A Dgetpid.cpp37 if (__predict_true(self)) { in __get_cached_pid()
39 if (__predict_true(self->get_cached_pid(&cached_pid))) { in __get_cached_pid()
48 if (__predict_true(cached_pid != 0)) { in getpid()
H A Dvdso.cpp30 if (__predict_true(result == 0)) return 0; in vdso_return()
39 if (__predict_true(vdso_clock_gettime)) { in clock_gettime()
48 if (__predict_true(vdso_clock_getres)) { in clock_getres()
57 if (__predict_true(vdso_gettimeofday)) { in gettimeofday()
65 if (__predict_true(vdso_time)) { in time()
H A Dgettid.cpp36 if (__predict_true(self)) { in gettid()
38 if (__predict_true(tid != -1)) { in gettid()
H A Dpthread_rwlock.cpp275 …while (__predict_true(__can_acquire_read_lock(old_state, rwlock->writer_nonrecursive_preferred))) { in __pthread_rwlock_tryrdlock()
281 if (__predict_true(atomic_compare_exchange_weak_explicit(&rwlock->state, &old_state, new_state, in __pthread_rwlock_tryrdlock()
350 while (__predict_true(__can_acquire_write_lock(old_state))) { in __pthread_rwlock_trywrlock()
351 if (__predict_true(atomic_compare_exchange_weak_explicit(&rwlock->state, &old_state, in __pthread_rwlock_trywrlock()
413 if (__predict_true(__pthread_rwlock_tryrdlock(rwlock) == 0)) { in pthread_rwlock_rdlock()
451 if (__predict_true(__pthread_rwlock_trywrlock(rwlock) == 0)) { in pthread_rwlock_wrlock()
H A Dpthread_key.cpp168 if (__predict_true(SeqOfKeyInUse(seq) && data->seq == seq)) { in pthread_getspecific()
184 if (__predict_true(SeqOfKeyInUse(seq))) { in pthread_setspecific()
H A Dpthread_once.cpp57 if (__predict_true(old_value == ONCE_INITIALIZATION_COMPLETE)) { in pthread_once()
H A Dmalloc_tagged_pointers.h113 if (__predict_true(ptr != nullptr)) { in MaybeTagPointer()
H A Dbionic_elf_tls.cpp332 if (__predict_true(generation == dtv->generation)) { in TLS_GET_ADDR()
334 if (__predict_true(mod_ptr != nullptr)) { in TLS_GET_ADDR()
H A Dpthread_create.cpp145 if (__predict_true((thread->attr.flags & PTHREAD_ATTR_FLAG_DETACHED) == 0)) { in __init_thread()
/aosp12/bionic/libc/private/
H A Dbionic_lock.h55 return __predict_true(atomic_compare_exchange_strong_explicit(&state, &old_state, in trylock()
61 if (__predict_true(atomic_compare_exchange_strong_explicit(&state, &old_state, in lock()
/aosp12/bionic/linker/
H A Dlinker_relocate.h61 if (__predict_true(ELF_ST_BIND(s->st_info) == STB_GLOBAL || in is_symbol_global_and_defined()
/aosp12/system/core/llkd/
H A Dlibllkd.cpp151 : fd(__predict_true(directory != nullptr) in dir()
351 if (__predict_true(len < (sizeof(comm) - 1))) { in getComm()
353 if ((comm[len] != ']') && __predict_true(len < (sizeof(comm) - 2))) { in getComm()
755 return (pwd != nullptr) && __predict_true(pwd->pw_name != nullptr) && in llkSkipUid()
756 __predict_true(pwd->pw_name[0] != '\0') && llkSkipName(pwd->pw_name, llkIgnorelistUid); in llkSkipUid()
/aosp12/bionic/libc/include/sys/
H A Dcdefs.h129 #define __predict_true(exp) __builtin_expect((exp) != 0, 1) macro
/aosp12/bionic/libc/system_properties/
H A Dsystem_properties.cpp160 if (__predict_true(serial == new_serial)) { in ReadMutablePropertyValue()