Merge "Clean up __always_inline" into main
This commit is contained in:
commit
0b1161d9b5
3 changed files with 5 additions and 4 deletions
|
@ -35,7 +35,7 @@
|
|||
|
||||
extern "C" {
|
||||
|
||||
static __always_inline int ifunc_faccessat(int dir_fd, const char* path, int mode) {
|
||||
static inline __always_inline int ifunc_faccessat(int dir_fd, const char* path, int mode) {
|
||||
register long a0 __asm__("a0") = dir_fd;
|
||||
register long a1 __asm__("a1") = reinterpret_cast<long>(path);
|
||||
register long a2 __asm__("a2") = mode;
|
||||
|
|
|
@ -69,11 +69,12 @@
|
|||
#define RWLOCKATTR_KIND_MASK 2
|
||||
#define RWLOCKATTR_RESERVED_MASK (~3)
|
||||
|
||||
static inline __always_inline __always_inline bool __rwlockattr_getpshared(const pthread_rwlockattr_t* attr) {
|
||||
static inline __always_inline bool __rwlockattr_getpshared(const pthread_rwlockattr_t* attr) {
|
||||
return (*attr & RWLOCKATTR_PSHARED_MASK) >> RWLOCKATTR_PSHARED_SHIFT;
|
||||
}
|
||||
|
||||
static inline __always_inline __always_inline void __rwlockattr_setpshared(pthread_rwlockattr_t* attr, int pshared) {
|
||||
static inline __always_inline void __rwlockattr_setpshared(pthread_rwlockattr_t* attr,
|
||||
int pshared) {
|
||||
*attr = (*attr & ~RWLOCKATTR_PSHARED_MASK) | (pshared << RWLOCKATTR_PSHARED_SHIFT);
|
||||
}
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ bool* g_zygote_child;
|
|||
|
||||
const MallocDispatch* g_dispatch;
|
||||
|
||||
static __always_inline uint64_t Nanotime() {
|
||||
static inline __always_inline uint64_t Nanotime() {
|
||||
struct timespec t = {};
|
||||
clock_gettime(CLOCK_MONOTONIC, &t);
|
||||
return static_cast<uint64_t>(t.tv_sec) * 1000000000LL + t.tv_nsec;
|
||||
|
|
Loading…
Reference in a new issue