Commit graph

277 commits

Author SHA1 Message Date
Ondřej Surý
46919579bb Make isc_thread_join() assert internally on failure
Previously isc_thread_join() would return ISC_R_UNEXPECTED on a failure to
create new thread.  All such occurences were caught and wrapped into assert
function at higher level.  The function was simplified to assert directly in the
isc_thread_join() function and all caller level assertions were removed.
2019-07-31 11:56:58 +02:00
Ondřej Surý
d6a60f2905 Make isc_thread_create() assert internally on failure
Previously isc_thread_create() would return ISC_R_UNEXPECTED on a failure to
create new thread.  All such occurences were caught and wrapped into assert
function at higher level.  The function was simplified to assert directly in the
isc_thread_create() function and all caller level assertions were removed.
2019-07-31 11:56:58 +02:00
Michał Kępień
df42771a54 Define ATOMIC_VAR_INIT() on Windows
Commit b104a9bc50 introduced unconditional
use of the ATOMIC_VAR_INIT() macro in bin/dnssec/dnssec-signzone.c even
though that macro is only defined on Unix platforms.  Define it on
Windows systems as well in order to prevent build failures.
2019-07-03 14:27:53 +02:00
Ondřej Surý
0f9f1ece14 Stop requiring same memory ordering in win32 atomic_compare_exchange functions 2019-06-20 18:52:27 +02:00
Evan Hunt
2f13524164 initalize a named_g_defaultbindkeys variable 2019-02-06 13:18:00 +11:00
Witold Kręcicki
9ded5d5193 Cast atomic_load_explicit to proper size 2019-01-30 14:12:06 +01:00
Ondřej Surý
f2d1a88efc Add #pragma intrinsic for intrinsic Windows functions 2019-01-30 13:48:58 +01:00
Ondřej Surý
9539e1c3a1 Fix memory_order_cst_seq -> memory_order_seq_cst typo 2019-01-30 13:48:58 +01:00
Ondřej Surý
4f5e83b139 Add define for InterlockedExchangeAdd8 intrinsic 2019-01-30 13:48:58 +01:00
Ondřej Surý
7a7a8b0f7b Add atomic_bool implementation to unix and win32 stdatomic.h shim headers 2019-01-30 09:37:38 +01:00
Ondřej Surý
a84e70acd0 Fix copy&paste error in the atomic_fetch_add_explicit{32,64} macros.
- InterlockedExchange was incorrectly used in place where InterlockedExchangeAdd
  should have been used
2019-01-30 09:37:38 +01:00
Evan Hunt
19dd6a409c Fix a typo in the win32 version of the atomic_store macro 2019-01-30 09:37:38 +01:00
Witold Kręcicki
929ea7c2c4 - Make isc_mutex_destroy return void
- Make isc_mutexblock_init/destroy return void
- Minor cleanups
2018-11-22 11:52:08 +00:00
Ondřej Surý
2f3eee5a4f isc_mutex_init returns 'void' 2018-11-22 11:51:49 +00:00
Ondřej Surý
73a8999d1c isc_condition_init returns 'void' 2018-11-22 11:51:49 +00:00
Ondřej Surý
6f5fe11f5a isc_stdtime_t is always 32-bit now, so remove the always true macro STDTIME_ON_32BITS 2018-11-09 02:27:06 +07:00
Ondřej Surý
23fff6c569 Hint the compiler with ISC_UNREACHABLE(); that code after INSIST(0); cannot be reached 2018-11-08 12:22:17 +07:00
Witold Krecicki
7b6721b27f isc_thread_setaffinity() 2018-11-06 08:19:50 +00:00
Ondřej Surý
7fd3dc63de Add generic message digest API (isc_md) to replace specific MD functions md5/sha1/sha256 2018-10-25 08:15:42 +02:00
Mark Andrews
0eda75fec0 don't typedef socklen_t for _MSC_VER >= 1914 2018-09-20 13:51:50 +10:00
Ondřej Surý
2750799132 Assume socklen_t is always available on all supported platforms (except on Windows where it is typedefed to int32_t) 2018-09-07 12:17:40 +02:00
Ondřej Surý
4d46f0f95d Drop ISC_PLATFORM_USEDECLSPEC and IRS_PLATFORM_USEDECLSPEC as they are platform dependent and only unix vs win32 platform.h header difference is enough 2018-09-07 12:17:30 +02:00
Ondřej Surý
47f18c7d50 Replace platform ISC_PLATFORM_NEEDSTRLCPY and ISC_PLATFORM_NEEDSTRLCAT with AC_CHECK_FUNCS call 2018-09-07 12:17:30 +02:00
Ondřej Surý
f8635fd719 Remove dummy ISC_PLATFORM_NEEDSTRCASESTR define from platform.h 2018-09-07 12:17:30 +02:00
Ondřej Surý
22e5231f99 Remove ISC_PLATFORM_BUSYWAITNOP in favour of direct isc_rwlock_pause() define 2018-09-07 12:17:29 +02:00
Ondřej Surý
510bb376e1 Define platform.h ISC_PLATFORM_USEBACKTRACE with config.h USE_BACKTRACE 2018-09-07 12:17:29 +02:00
Ondřej Surý
0dc714c40d On 32-bit Windows use only default memory ordering 2018-09-05 22:20:58 +02:00
Ondřej Surý
25248eb097 Bail-out early in the for install loops instead of continuing because for masks the error in the middle 2018-09-03 12:05:45 +02:00
Ondřej Surý
e582d085de Fix InterlockedCompareExchange64Acquire -> InterlockedCompareExchangeAcquire64 and variants 2018-08-29 22:23:46 +02:00
Ondřej Surý
aa3e33575d Fixup Windows build after strerr changes 2018-08-29 21:21:52 +02:00
Ondřej Surý
fecbc7923a Remove isc_keyboard family of functions as they were not used anywhere 2018-08-28 14:37:30 +02:00
Ondřej Surý
e119de4169 Replace arch specific atomic.h with global atomic.h header using either stdatomic, __atomic or __sync primitives 2018-08-28 12:15:39 +02:00
Ondřej Surý
1672935717 Use strerror_r from POSIX.1-2001 (strerror_s on Windows) instead of custom isc__strerror() 2018-08-28 10:31:48 +02:00
Ondřej Surý
29c853f500 Remove check for isc_port_t; Windows never have it, Unix always have it 2018-08-28 10:31:48 +02:00
Ondřej Surý
388d6db5a1 Remove support for legacy systems without inet_{ntop,pton} w/ IPv6 support 2018-08-28 10:31:48 +02:00
Ondřej Surý
3ab9c99567 Remove support for legacy systems without in6_pktinfo 2018-08-28 10:31:48 +02:00
Ondřej Surý
8c526df306 Remove support for legacy systems without sin6_scope_id 2018-08-28 10:31:48 +02:00
Ondřej Surý
7b21bbb7c1 Require IPv6 support from the OS 2018-08-28 10:31:47 +02:00
Ondřej Surý
f0f71420c8 Remove legacy support for AIX 2018-08-28 10:31:47 +02:00
Ondřej Surý
7ab228cf71 Use __declspec( thread ) for thread local storage when compiling with Visual Studio 2015 and higher 2018-08-25 13:59:26 +02:00
Witold Kręcicki
5cdb38c2c7 Remove unthreaded support 2018-08-16 17:18:52 +02:00
Ondřej Surý
994e656977 Replace custom isc_boolean_t with C standard bool type 2018-08-08 09:37:30 +02:00
Ondřej Surý
cb6a185c69 Replace custom isc_u?intNN_t types with C99 u?intNN_t types 2018-08-08 09:37:28 +02:00
Ondřej Surý
64fe6bbaf2 Replace ISC_PRINT_QUADFORMAT with inttypes.h format constants 2018-08-08 09:36:44 +02:00
Ondřej Surý
08974f39f1 Fix the Windows build 2018-07-19 14:00:40 -04:00
Ondřej Surý
c3b8130fe8 Make OpenSSL mandatory 2018-07-19 12:47:03 -04:00
Ondřej Surý
4f6d6919ab Remove thread_local macro from win32 platform.h 2018-05-30 23:03:22 +02:00
Ondřej Surý
05d7aa5734 Fix various build failures on Windows (Courtesy of rockerinthelocker) 2018-05-30 15:09:55 +02:00
Ondřej Surý
ce71d94434 Make the xoshiro128plusplus thread-safe 2018-05-29 22:58:49 +02:00
Ondřej Surý
7ee8a7e69f address win32 build issues
- Replace external -DOPENSSL/-DPKCS11CRYPTO with properly AC_DEFINEd
  HAVE_OPENSSL/HAVE_PKCS11
- Don't enforce the crypto provider from platform.h, just from dst_api.c
  and configure scripts
2018-05-22 16:32:21 -07:00