These are compiler builtins. They are available for user development. You need no header to include, if gcc on your architecture supports them, it will produce correct assembler, if no, then it will produce an error.
How to use __sync_fetch_and_add for a Linux userspace program on beagleboard/gumstix
-
06-10-2022 - |
문제
I am looking to use the __sync_fetch_and_xxx functions for thread safe shared memory access on my Linux application with a beagleboard and gumstix. I can't seem to find the correct header to include. Are these functions only available for kernel development?
Thanks
해결책
제휴하지 않습니다 StackOverflow