Compare commits

...

1 Commits

Author SHA1 Message Date
Ondřej Surý
8f5989d660 Add diagnostic message to see what atomics is really in use 2018-08-15 14:01:35 +02:00
3 changed files with 32 additions and 0 deletions

View File

@@ -101,6 +101,14 @@ ISC_LANG_BEGINDECLS
#define ISC_REFCOUNT_HAVESTDATOMIC 1
#endif
#if ISC_RECOUNT_HAVEATOMIC
#pragma message("ISC_RECOUNT_HAVEATOMIC is defined")
#endif
#if ISC_REFCOUNT_HAVESTDATOMIC
#pragma message("ISC_REFCOUNT_HAVESTDATOMIC is defined")
#endif
typedef struct isc_refcount {
#if defined(ISC_REFCOUNT_HAVESTDATOMIC)
atomic_int_fast32_t refs;

View File

@@ -42,6 +42,14 @@ typedef enum {
#endif
#endif
#if ISC_RWLOCK_USEATOMIC
#pragma message("ISC_RWLOCK_USEATOMIC is defined")
#endif
#if ISC_RWLOCK_USESTDATOMIC
#pragma message("ISC_RWLOCK_USESTDATOMIC is defined")
#endif
struct isc_rwlock {
/* Unlocked. */
unsigned int magic;

View File

@@ -81,6 +81,22 @@
#define ISC_STATS_USEMULTIFIELDS 0
#endif
#if ISC_STATS_HAVEATOMICQ
#pragma message("ISC_STATS_HAVEATOMICQ is defined")
#endif
#if ISC_STATS_HAVESTDATOMICQ
#pragma message("ISC_STATS_HAVESTDATOMICQ is defined")
#endif
#if ISC_STATS_LOCKCOUNTERS
#pragma message("ISC_STATS_LOCKCOUNTERS is defined")
#endif
#if ISC_STATS_USEMULTIFIELDS
#pragma message("ISC_STATS_USEMULTIFIELDS is defined")
#endif
#if ISC_STATS_HAVESTDATOMIC
#pragma message("ISC_STATS_HAVESTDATOMIC is defined")
#endif
#if ISC_STATS_USEMULTIFIELDS
typedef struct {
#if defined(ISC_STATS_HAVESTDATOMIC)