Skip to content

Commit a4ba7c9

Browse files
committed
Add inline
1 parent 591b562 commit a4ba7c9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

qemu/include/tcg/tcg-apple-jit.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ static inline void jit_write_protect(int enabled)
3737
// Taken from
3838
// https://stackoverflow.com/questions/70019553/lldb-how-to-read-the-permissions-of-a-memory-region-for-a-thread
3939
// https://blog.svenpeter.dev/posts/m1_sprr_gxf/
40-
static uint64_t read_sprr_perm(void)
40+
static inline uint64_t read_sprr_perm(void)
4141
{
4242
uint64_t v;
4343
__asm__ __volatile__("isb sy\n"
@@ -46,19 +46,19 @@ static uint64_t read_sprr_perm(void)
4646
return v;
4747
}
4848

49-
__attribute__((unused)) static uint8_t thread_mask()
49+
__attribute__((unused)) static inline uint8_t thread_mask()
5050
{
5151
uint64_t v = read_sprr_perm();
5252

5353
return (v >> 20) & 3;
5454
}
5555

56-
__attribute__((unused)) static bool thread_writeable()
56+
__attribute__((unused)) static inline bool thread_writeable()
5757
{
5858
return thread_mask() == 3;
5959
}
6060

61-
__attribute__((unused)) static bool thread_executable()
61+
__attribute__((unused)) static inline bool thread_executable()
6262
{
6363
return thread_mask() == 1;
6464
}

0 commit comments

Comments
 (0)