File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ static inline void jit_write_protect(int enabled)
37
37
// Taken from
38
38
// https://stackoverflow.com/questions/70019553/lldb-how-to-read-the-permissions-of-a-memory-region-for-a-thread
39
39
// 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 )
41
41
{
42
42
uint64_t v ;
43
43
__asm__ __volatile__("isb sy\n"
@@ -46,19 +46,19 @@ static uint64_t read_sprr_perm(void)
46
46
return v ;
47
47
}
48
48
49
- __attribute__((unused )) static uint8_t thread_mask ()
49
+ __attribute__((unused )) static inline uint8_t thread_mask ()
50
50
{
51
51
uint64_t v = read_sprr_perm ();
52
52
53
53
return (v >> 20 ) & 3 ;
54
54
}
55
55
56
- __attribute__((unused )) static bool thread_writeable ()
56
+ __attribute__((unused )) static inline bool thread_writeable ()
57
57
{
58
58
return thread_mask () == 3 ;
59
59
}
60
60
61
- __attribute__((unused )) static bool thread_executable ()
61
+ __attribute__((unused )) static inline bool thread_executable ()
62
62
{
63
63
return thread_mask () == 1 ;
64
64
}
You can’t perform that action at this time.
0 commit comments