1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

lib/replace: For heimdal_build: Try to use the OS or compiler provided atomic operators

This provides the defines that may be needed to use the
compiler-provided atomics, rather than a fallback.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
This commit is contained in:
Andrew Bartlett 2021-07-06 12:26:44 +12:00
parent 2701293f48
commit a0d75b1cce

View File

@ -298,6 +298,13 @@ def configure(conf):
'HAVE___SYNC_FETCH_AND_ADD',
msg='Checking for __sync_fetch_and_add compiler builtin')
conf.CHECK_CODE('''
int i;
(void)__sync_add_and_fetch(&i, 1);
''',
'HAVE___SYNC_ADD_AND_FETCH',
msg='Checking for __sync_add_and_fetch compiler builtin')
conf.CHECK_CODE('''
int32_t i;
atomic_add_32(&i, 1);