Evan Hunt
e851ed0bb5
apply the modified style
2020-02-13 15:05:06 -08:00
Ondřej Surý
056e133c4c
Use clang-tidy to add curly braces around one-line statements
...
The command used to reformat the files in this commit was:
./util/run-clang-tidy \
-clang-tidy-binary clang-tidy-11
-clang-apply-replacements-binary clang-apply-replacements-11 \
-checks=-*,readability-braces-around-statements \
-j 9 \
-fix \
-format \
-style=file \
-quiet
clang-format -i --style=format $(git ls-files '*.c' '*.h')
uncrustify -c .uncrustify.cfg --replace --no-backup $(git ls-files '*.c' '*.h')
clang-format -i --style=format $(git ls-files '*.c' '*.h')
2020-02-13 22:07:21 +01:00
Ondřej Surý
f50b1e0685
Use clang-format to reformat the source files
2020-02-12 15:04:17 +01:00
Mark Andrews
7b948c7335
remove brackets
2020-02-04 11:09:22 +01:00
Ondřej Surý
b1a7ec7481
Remove isc_thread_key API in favor of ISC_THREAD_LOCAL variables
...
For BIND 9.16+, TLS aware compiler is required, and using
ISC_THREAD_LOCAL is preferred way of using Thread Local Storage. The
isc_thread_key API is no longer used anywhere and hence was removed from
BIND 9.
2019-12-04 14:17:19 +01:00
Ondřej Surý
01731d4b1b
Add and use ISC_THREAD_LOCAL macro
...
The new ISC_THREAD_LOCAL macro unifies usage of platform dependent
Thread Local Storage definition thread_local vs __thread vs
__declspec(thread) to a single macro.
The commit also unifies the required level of support for TLS as for
some parts of the code it was mandatory and for some parts of the code
it wasn't.
2019-12-03 16:27:24 +01:00
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
Ondřej Surý
78d0cb0a7d
Use coccinelle to remove explicit '#include <config.h>' from the source files
2019-03-08 15:15:05 +01:00
Ondřej Surý
e2cdf066ea
Remove message catalogs
2019-01-09 23:44:26 +01:00
Håvard Eidnes
f6c4ed94e4
Fix the build on NetBSD due to the differences in pthread implementation.
...
Signed-off-by: Ondřej Surý <ondrej@sury.org >
2018-11-22 09:43:43 -05: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
Witold Kręcicki
0bed9bfc28
isc_mutex_init and isc_condition_init failures are now fatal
2018-11-22 11:51:49 +00:00
Evan Hunt
1f0cd6606e
style: one-line statement braces, line length, etc
2018-11-15 08:21:40 +00:00
Witold Krecicki
e55bbec66e
FreeBSD fixes - proper affinity setting, don't use SO_REUSEPORT
2018-11-15 08:21:17 +00:00
Witold Kręcicki
ce478b4fc9
Fix a typo in lib/isc/unix/thread.c
2018-11-07 19:31:06 +00:00
Witold Krecicki
7b6721b27f
isc_thread_setaffinity()
2018-11-06 08:19:50 +00:00
Ondřej Surý
161b5dccae
Remove NEED_PTHREAD_SCOPE_SYSTEM define that was needed on older FreeBSDs
2018-09-07 12:17:40 +02:00
Ondřej Surý
5d8f9bf935
Always enable CALL_PTHREAD_SETCONCURRENCY as it is part of POSIX Threads
2018-09-07 12:17:40 +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
Evan Hunt
1656152d76
Ensure that POSIX strerror_r variant is use even when _GNU_SOURCE is enabled by default
2018-08-29 13:31:28 +02:00
Ondřej Surý
cacd21c075
Enable system extensions macros using AC_USE_SYSTEM_EXTENSIONS
...
and remove handcrafted code that enabled __EXTENSIONS__ and _GNU_SOURCE
2018-08-29 13:31:27 +02:00
Ondřej Surý
52e1c45156
Assume PTHREAD_ONCE_INIT is not broken (remove support for ancient Solaris)
2018-08-28 10:31:48 +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ý
994e656977
Replace custom isc_boolean_t with C standard bool type
2018-08-08 09:37:30 +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
Ondřej Surý
23c1f7e506
Enforce usage of OpenSSL or PKCS#11 library in platform.h header
2018-05-13 19:18:56 -07:00
Ondřej Surý
55a10b7acd
Remove $Id markers, Principal Author and Reviewed tags from the full source tree
2018-05-11 13:17:46 +02:00
Ondřej Surý
843d389661
Update license headers to not include years in copyright in all applicable files
2018-02-23 10:12:02 +01:00
Mark Andrews
2e83674170
conditionally declare stacksize
2018-02-16 10:20:39 +11:00
Mark Andrews
eb346d7098
'name' should be on isc_thread_setname argument not isc_thread_create
...
(cherry picked from commit 15471a63a2
)
2017-06-26 12:21:33 +10:00
Evan Hunt
8ee6a6afd8
[master] fix portability issue
2017-04-21 18:16:00 -07:00
Tinderbox User
3618b965d1
update copyright notice / whitespace
2017-04-21 23:45:41 +00:00
Evan Hunt
d26ae7fc08
[master] give threads unique names to assist debugging
...
4602. [func] Threads are now set to human-readable
names to assist debugging, when supported by
the OS. [RT #43234 ]
2017-04-21 13:59:40 -07:00
Evan Hunt
6087f87afb
[master] make uninstall
...
4503. [cleanup] "make uninstall" now removes file installed by
BIND. (This currently excludes Python files
due to lack of support in setup.py.) [RT #42912 ]
2016-11-01 19:17:07 -07:00
Mark Andrews
0c27b3fe77
4401. [misc] Change LICENSE to MPL 2.0.
2016-06-27 14:56:38 +10:00
Tinderbox User
3865e18d3d
update copyright notice / whitespace
2015-11-09 23:45:22 +00:00
Evan Hunt
e13d04fda9
[master] fix python script versions
...
4257. [cleanup] Python scripts reported incorrect version. [RT #41080 ]
2015-11-08 21:34:24 -08:00
Francis Dupont
3759f10fc5
added print.h includes, updated copyrights
2015-05-23 14:21:51 +02:00
Mark Andrews
42580072de
protect with #ifdef HAVE_PTHREAD_MUTEX_ADAPTIVE_NP
2015-02-27 11:37:35 +11:00
Mukund Sivaraman
ebeb668f86
Remove unused functions ( #38547 )
2015-02-26 14:47:03 +05:30
Mukund Sivaraman
07dd40e8ee
Initialize pthread_mutexattrs just once ( #38547 )
2015-02-26 14:43:45 +05:30
Tinderbox User
92059a966a
update copyright notice / whitespace
2015-02-03 23:46:29 +00:00
Mukund Sivaraman
fe12a8f107
Fix a leak of pthread_mutexattr_t ( #38454 )
...
4051. [bug] Fix a leak of pthread_mutexattr_t. [RT #38454 ]
2015-02-03 11:42:06 +05:30
Tinderbox User
7bd4556414
update copyright notice
2014-03-10 23:46:12 +00:00
Evan Hunt
8cbf3b6fc3
[master] use adaptive locks when available
...
3781. [tuning] Use adaptive mutex locks when available; this
has been found to improve performance under load
on many systems. "configure --with-locktype=standard"
restores conventional mutex locks. [RT #32576 ]
2014-03-10 12:14:35 -07:00
Tinderbox User
4e3e8cbea0
update copyright notice
2013-10-08 04:13:49 +00:00
Mark Andrews
03152360db
3661. [bug] Address lock order reversal deadlock with inline zones.
...
[RT #34856 ]
2013-10-08 11:43:08 +11:00