mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 23:08:31 +00:00
Make spinlocks faster (take two)
This change is green on x86 and arm test fleet.
This commit is contained in:
parent
02e1cbcd00
commit
59692b0882
14 changed files with 122 additions and 79 deletions
|
@ -20,7 +20,7 @@
|
|||
|
||||
// returns true if `p` is preceded by x86 call instruction
|
||||
// this is actually impossible to do but we'll do our best
|
||||
dontinstrument int __is_call(const unsigned char *p) {
|
||||
privileged dontinstrument int __is_call(const unsigned char *p) {
|
||||
if (p[-5] == 0xe8)
|
||||
return 5; // call Jvds
|
||||
if (p[-2] == 0xff && (p[-1] & 070) == 020)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue