cmogstored.git  about / heads / tags
alternative mogstored implementation for MogileFS
blob 3fc291f575c7922f1e49f4f793b79919b4f46ef3 648 bytes (raw)
$ git show HEAD:gcc.h	# shows this blob on the CLI

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
 
/*
 * Copyright (C) 2012-2020 all contributors <cmogstored-public@yhbt.net>
 * License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
 */
#define MOG_PRINTF __attribute__((format(printf,1,2)))
#define MOG_LIKELY(x) (__builtin_expect((x), 1))
#define MOG_UNLIKELY(x) (__builtin_expect((x), 0))
#define MOG_NOINLINE __attribute__((noinline))
#define MOG_CHECK __attribute__((warn_unused_result))
#define mog_sync_add_and_fetch(dst,val) __sync_add_and_fetch((dst),(val))
#define mog_sync_sub_and_fetch(dst,val) __sync_sub_and_fetch((dst),(val))

/* need the synchronization, right? */
#define mog_sync_fetch(dst) mog_sync_add_and_fetch((dst),0)

git clone https://yhbt.net/cmogstored.git