diff --git a/Userland/Libraries/LibC/serenity.h b/Userland/Libraries/LibC/serenity.h index 7771026a11c900..c60625494b19d9 100644 --- a/Userland/Libraries/LibC/serenity.h +++ b/Userland/Libraries/LibC/serenity.h @@ -22,6 +22,11 @@ int profiling_free_buffer(pid_t); int futex(uint32_t* userspace_address, int futex_op, uint32_t value, const struct timespec* timeout, uint32_t* userspace_address2, uint32_t value3); +#ifndef ALWAYS_INLINE +# define ALWAYS_INLINE inline __attribute__((always_inline)) +# define ALWAYS_INLINE_SERENITY_H +#endif + static ALWAYS_INLINE int futex_wait(uint32_t* userspace_address, uint32_t value, const struct timespec* abstime, int clockid) { int op; @@ -42,6 +47,10 @@ static ALWAYS_INLINE int futex_wake(uint32_t* userspace_address, uint32_t count) return futex(userspace_address, FUTEX_WAKE, count, NULL, NULL, 0); } +#ifdef ALWAYS_INLINE_SERENITY_H +# undef ALWAYS_INLINE +#endif + int purge(int mode); int perf_event(int type, uintptr_t arg1, uintptr_t arg2); diff --git a/Userland/Libraries/LibC/sys/cdefs.h b/Userland/Libraries/LibC/sys/cdefs.h index 15ee0b0a8d6106..00d6444102737c 100644 --- a/Userland/Libraries/LibC/sys/cdefs.h +++ b/Userland/Libraries/LibC/sys/cdefs.h @@ -8,10 +8,6 @@ #define _POSIX_VERSION 200809L -#ifndef ALWAYS_INLINE -# define ALWAYS_INLINE inline __attribute__((always_inline)) -#endif - #ifdef __cplusplus # ifndef __BEGIN_DECLS # define __BEGIN_DECLS extern "C" {