Created
April 7, 2015 22:52
-
-
Save milabs/5f370dca8990824a94be to your computer and use it in GitHub Desktop.
memset_volatile
This file contains hidden or 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
/* | |
* memset_volatile is a volatile pointer to the memset function. | |
* You can call (*memset_volatile)(buf, val, len) or even | |
* memset_volatile(buf, val, len) just as you would call | |
* memset(buf, val, len), but the use of a volatile pointer | |
* guarantees that the compiler will not optimise the call away. | |
*/ | |
void * (* volatile memset_volatile)(void *, int, size_t) = memset; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment