diff options
author | Jake Burkholder <jake@FreeBSD.org> | 2003-04-02 08:02:27 +0000 |
---|---|---|
committer | Jake Burkholder <jake@FreeBSD.org> | 2003-04-02 08:02:27 +0000 |
commit | cef57e76240edfab3f91ecf9e50353b5bdd841c9 (patch) | |
tree | 66041b2d50e003cbdefc4f9db88ca96c5465e56c /sys/amd64/amd64/support.S | |
parent | 245f3abfd52e34833f603423914816bb62e2ef13 (diff) | |
download | src-cef57e76240edfab3f91ecf9e50353b5bdd841c9.tar.gz src-cef57e76240edfab3f91ecf9e50353b5bdd841c9.zip |
- Make casuptr return the old value of the location we're trying to update,
and change the umtx code to expect this.
Reviewed by: jeff
Notes
Notes:
svn path=/head/; revision=112967
Diffstat (limited to 'sys/amd64/amd64/support.S')
-rw-r--r-- | sys/amd64/amd64/support.S | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/amd64/amd64/support.S b/sys/amd64/amd64/support.S index cc53683b0a86..cdf78bfc6c62 100644 --- a/sys/amd64/amd64/support.S +++ b/sys/amd64/amd64/support.S @@ -1192,12 +1192,11 @@ ENTRY(casuptr) #endif /* !SMP */ /* - * We store the current value regardless of the success of the - * cmpxchg. Calling code checks for new == return to determine - * success. + * The old value is in %eax. If the store succeeded it will be the + * value we expected (old) from before the store, otherwise it will + * be the current value. */ - movl (%edx), %eax - + movl PCPU(CURPCB),%ecx movl $fusufault,PCB_ONFAULT(%ecx) movl $0,PCB_ONFAULT(%ecx) |