diff options
author | Oto Šťáva <oto.stava@nic.cz> | 2024-06-18 17:18:37 +0200 |
---|---|---|
committer | Oto Šťáva <oto.stava@nic.cz> | 2024-06-18 17:18:37 +0200 |
commit | ead0fed0bce014b5268ce9c67942618c9cc9de6f (patch) | |
tree | f9c95454afb6a93ed131f75a57cab31831f803c7 /daemon/io.h | |
parent | Merge branch 'manager-dir-cleaning' into 'master' (diff) | |
download | knot-resolver-ead0fed0bce014b5268ce9c67942618c9cc9de6f.tar.xz knot-resolver-ead0fed0bce014b5268ce9c67942618c9cc9de6f.zip |
daemon: use __attribute__((constructor)) for protolayer_globals
The `protolayer_globals` array can basically be treated as a constant by
most of the program and its initialization only uses compile-time-known
values. We basically only initialize parts of the array in different
files throughout the codebase to maintain separation of concerns, so
that each piece of Knot Resolver initializes the part that pertains to
it. Therefore, I believe that it is more ergonomic to just use
`__attribute__((constructor))` for these functions, so as not to pollute
`daemon/main.c` with these calls.
Diffstat (limited to 'daemon/io.h')
-rw-r--r-- | daemon/io.h | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/daemon/io.h b/daemon/io.h index b03c6aae..268a8c9d 100644 --- a/daemon/io.h +++ b/daemon/io.h @@ -17,9 +17,6 @@ struct tls_ctx; struct tls_client_ctx; struct io_stream_data; -/** Initializes the protocol layers managed by io. */ -void io_protolayers_init(void); - /** Bind address into a file-descriptor (only, no libuv). type is e.g. SOCK_DGRAM */ int io_bind(const struct sockaddr *addr, int type, const endpoint_flags_t *flags); /** Initialize a UDP handle and start listening. */ |