-
-
Save jnthn/9cc24984158fb26eb8c8ffa7d89bd3ed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AO_INLINE AO_t AO_fetch_compare_and_swap_full(volatile AO_t *addr, | |
AO_t old, AO_t new_val) | |
{ | |
AO_t retval; | |
__asm__ __volatile__ ( | |
# ifndef __s390x__ | |
" cs %1,%2,0(%3)\n" | |
# else | |
" csg %1,%2,0(%3)\n" | |
# endif | |
: "2" (retval), "+d" (old) | |
: "d" (new_val), "a" (addr) | |
: "cc", "memory"); | |
return retval; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment