📄 atomic_functions.h
字号:
# ifdef UNIXSTL_HAS_ATOMIC_DECREMENT
using atomic_decrement;
# define PLATFORMSTL_HAS_ATOMIC_DECREMENT
# endif /* UNIXSTL_HAS_ATOMIC_DECREMENT */
# ifdef UNIXSTL_HAS_ATOMIC_READ
using atomic_read;
# define PLATFORMSTL_HAS_ATOMIC_READ
# endif /* UNIXSTL_HAS_ATOMIC_READ */
# ifdef UNIXSTL_HAS_ATOMIC_WRITE
using atomic_write;
# define PLATFORMSTL_HAS_ATOMIC_WRITE
# endif /* UNIXSTL_HAS_ATOMIC_WRITE */
# ifdef UNIXSTL_HAS_ATOMIC_PREADD
using atomic_preadd;
# define PLATFORMSTL_HAS_ATOMIC_PREADD
# endif /* UNIXSTL_HAS_ATOMIC_PREADD */
# ifdef UNIXSTL_HAS_ATOMIC_POSTADD
using atomic_postadd;
# define PLATFORMSTL_HAS_ATOMIC_POSTADD
# endif /* UNIXSTL_HAS_ATOMIC_POSTADD */
# elif defined(PLATFORMSTL_OS_IS_WIN32)
/* OS: Win32 */
# if defined(_M_IX86) /* TODO: Abstract this for WinSTL as has been done for UNIXSTL */
/* Arch: i386 */
using atomic_preincrement_up;
using atomic_predecrement_up;
using atomic_postincrement_up;
using atomic_postdecrement_up;
using atomic_increment_up;
using atomic_decrement_up;
using atomic_write_up;
using atomic_read_up;
using atomic_postadd_up;
using atomic_preadd_up;
using atomic_preincrement_smp;
using atomic_predecrement_smp;
using atomic_postincrement_smp;
using atomic_postdecrement_smp;
using atomic_increment_smp;
using atomic_decrement_smp;
using atomic_write_smp;
using atomic_read_smp;
using atomic_postadd_smp;
using atomic_preadd_smp;
using atomic_preincrement;
using atomic_predecrement;
using atomic_postincrement;
using atomic_postdecrement;
using atomic_increment;
using atomic_decrement;
using atomic_write;
using atomic_read;
using atomic_postadd;
using atomic_preadd;
# define PLATFORMSTL_HAS_ATOMIC_PREINCREMENT
# define PLATFORMSTL_HAS_ATOMIC_PREDECREMENT
# define PLATFORMSTL_HAS_ATOMIC_POSTINCREMENT
# define PLATFORMSTL_HAS_ATOMIC_POSTDECREMENT
# define PLATFORMSTL_HAS_ATOMIC_INCREMENT
# define PLATFORMSTL_HAS_ATOMIC_DECREMENT
# define PLATFORMSTL_HAS_ATOMIC_READ
# define PLATFORMSTL_HAS_ATOMIC_WRITE
# define PLATFORMSTL_HAS_ATOMIC_PREADD
# define PLATFORMSTL_HAS_ATOMIC_POSTADD
# else /* ? arch */
# error Not valid for processors other than Intel
# endif /* arch */
# else /* ? operating system */
# error Operating system not discriminated
# endif /* operating system */
# else /* ? global */
/* Source atomic functions are defined within the global namespace. */
using implementation::platform_stl_::atomic_int_t;
# if defined(PLATFORMSTL_OS_IS_UNIX)
# ifdef UNIXSTL_HAS_ATOMIC_PREINCREMENT
using implementation::platform_stl_::atomic_preincrement;
# define PLATFORMSTL_HAS_ATOMIC_PREINCREMENT
# endif /* UNIXSTL_HAS_ATOMIC_PREINCREMENT */
# ifdef UNIXSTL_HAS_ATOMIC_PREDECREMENT
using implementation::platform_stl_::atomic_predecrement;
# define PLATFORMSTL_HAS_ATOMIC_PREDECREMENT
# endif /* UNIXSTL_HAS_ATOMIC_PREDECREMENT */
# ifdef UNIXSTL_HAS_ATOMIC_POSTINCREMENT
using implementation::platform_stl_::atomic_postincrement;
# define PLATFORMSTL_HAS_ATOMIC_POSTINCREMENT
# endif /* UNIXSTL_HAS_ATOMIC_POSTINCREMENT */
# ifdef UNIXSTL_HAS_ATOMIC_POSTDECREMENT
using implementation::platform_stl_::atomic_postdecrement;
# define PLATFORMSTL_HAS_ATOMIC_POSTDECREMENT
# endif /* UNIXSTL_HAS_ATOMIC_POSTDECREMENT */
# ifdef UNIXSTL_HAS_ATOMIC_INCREMENT
using implementation::platform_stl_::atomic_increment;
# define PLATFORMSTL_HAS_ATOMIC_INCREMENT
# endif /* UNIXSTL_HAS_ATOMIC_INCREMENT */
# ifdef UNIXSTL_HAS_ATOMIC_DECREMENT
using implementation::platform_stl_::atomic_decrement;
# define PLATFORMSTL_HAS_ATOMIC_DECREMENT
# endif /* UNIXSTL_HAS_ATOMIC_DECREMENT */
# ifdef UNIXSTL_HAS_ATOMIC_READ
using implementation::platform_stl_::atomic_read;
# define PLATFORMSTL_HAS_ATOMIC_READ
# endif /* UNIXSTL_HAS_ATOMIC_READ */
# ifdef UNIXSTL_HAS_ATOMIC_WRITE
using implementation::platform_stl_::atomic_write;
# define PLATFORMSTL_HAS_ATOMIC_WRITE
# endif /* UNIXSTL_HAS_ATOMIC_WRITE */
# ifdef UNIXSTL_HAS_ATOMIC_PREADD
using implementation::platform_stl_::atomic_preadd;
# define PLATFORMSTL_HAS_ATOMIC_PREADD
# endif /* UNIXSTL_HAS_ATOMIC_PREADD */
# ifdef UNIXSTL_HAS_ATOMIC_POSTADD
using implementation::platform_stl_::atomic_postadd;
# define PLATFORMSTL_HAS_ATOMIC_POSTADD
# endif /* UNIXSTL_HAS_ATOMIC_POSTADD */
# elif defined(PLATFORMSTL_OS_IS_WIN32)
/* OS: Win32 */
# if defined(_M_IX86) /* TODO: Abstract this for WinSTL as has been done for UNIXSTL */
/* Arch: i386 */
using implementation::platform_stl_::atomic_preincrement_up;
using implementation::platform_stl_::atomic_predecrement_up;
using implementation::platform_stl_::atomic_postincrement_up;
using implementation::platform_stl_::atomic_postdecrement_up;
using implementation::platform_stl_::atomic_increment_up;
using implementation::platform_stl_::atomic_decrement_up;
using implementation::platform_stl_::atomic_write_up;
using implementation::platform_stl_::atomic_read_up;
using implementation::platform_stl_::atomic_postadd_up;
using implementation::platform_stl_::atomic_preadd_up;
using implementation::platform_stl_::atomic_preincrement_smp;
using implementation::platform_stl_::atomic_predecrement_smp;
using implementation::platform_stl_::atomic_postincrement_smp;
using implementation::platform_stl_::atomic_postdecrement_smp;
using implementation::platform_stl_::atomic_increment_smp;
using implementation::platform_stl_::atomic_decrement_smp;
using implementation::platform_stl_::atomic_write_smp;
using implementation::platform_stl_::atomic_read_smp;
using implementation::platform_stl_::atomic_postadd_smp;
using implementation::platform_stl_::atomic_preadd_smp;
using implementation::platform_stl_::atomic_preincrement;
using implementation::platform_stl_::atomic_predecrement;
using implementation::platform_stl_::atomic_postincrement;
using implementation::platform_stl_::atomic_postdecrement;
using implementation::platform_stl_::atomic_increment;
using implementation::platform_stl_::atomic_decrement;
using implementation::platform_stl_::atomic_write;
using implementation::platform_stl_::atomic_read;
using implementation::platform_stl_::atomic_postadd;
using implementation::platform_stl_::atomic_preadd;
# define PLATFORMSTL_HAS_ATOMIC_PREINCREMENT
# define PLATFORMSTL_HAS_ATOMIC_PREDECREMENT
# define PLATFORMSTL_HAS_ATOMIC_POSTINCREMENT
# define PLATFORMSTL_HAS_ATOMIC_POSTDECREMENT
# define PLATFORMSTL_HAS_ATOMIC_INCREMENT
# define PLATFORMSTL_HAS_ATOMIC_DECREMENT
# define PLATFORMSTL_HAS_ATOMIC_READ
# define PLATFORMSTL_HAS_ATOMIC_WRITE
# define PLATFORMSTL_HAS_ATOMIC_PREADD
# define PLATFORMSTL_HAS_ATOMIC_POSTADD
# else /* ? arch */
# error Not valid for processors other than Intel
# endif /* arch */
# else /* ? operating system */
# error Operating system not discriminated
# endif /* operating system */
# endif /* global */
#endif /* __cplusplus */
/* ////////////////////////////////////////////////////////////////////// */
#if !defined(__cplusplus)
/* Nothing defined in C */
#elif defined(_STLSOFT_NO_NAMESPACE) || \
defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
} /* namespace platformstl */
#else
} /* namespace platformstl_project */
} /* namespace stlsoft */
#endif /* _STLSOFT_NO_NAMESPACE */
/* ////////////////////////////////////////////////////////////////////// */
#endif /* !PLATFORMSTL_INCL_PLATFORMSTL_SYNCH_H_REFCOUNT_FUNCTIONS */
/* ////////////////////////////////////////////////////////////////////// */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -