cmogstored 1.8.1 - use default system stack size
[cmogstored.git] / gcc.h
blob3fc291f575c7922f1e49f4f793b79919b4f46ef3
1 /*
2 * Copyright (C) 2012-2020 all contributors <cmogstored-public@yhbt.net>
3 * License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
4 */
5 #define MOG_PRINTF __attribute__((format(printf,1,2)))
6 #define MOG_LIKELY(x) (__builtin_expect((x), 1))
7 #define MOG_UNLIKELY(x) (__builtin_expect((x), 0))
8 #define MOG_NOINLINE __attribute__((noinline))
9 #define MOG_CHECK __attribute__((warn_unused_result))
10 #define mog_sync_add_and_fetch(dst,val) __sync_add_and_fetch((dst),(val))
11 #define mog_sync_sub_and_fetch(dst,val) __sync_sub_and_fetch((dst),(val))
13 /* need the synchronization, right? */
14 #define mog_sync_fetch(dst) mog_sync_add_and_fetch((dst),0)