Skip to content

Commit 0f2870e

Browse files
committed
cleanup ctors/dtors and remove priorities
1 parent 57d9b0b commit 0f2870e

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

src/coarse/coarse.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,6 @@
2222
#include "utils_concurrency.h"
2323
#include "utils_log.h"
2424

25-
#ifdef _WIN32
26-
UTIL_ONCE_FLAG Log_initialized = UTIL_ONCE_FLAG_INIT;
27-
#else
28-
void __attribute__((constructor)) coarse_init(void) { utils_log_init(); }
29-
void __attribute__((destructor)) coarse_destroy(void) {}
30-
#endif /* _WIN32 */
31-
3225
typedef struct coarse_t {
3326
// handle of the memory provider
3427
void *provider;

src/proxy_lib/proxy_lib_linux.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
*
3-
* Copyright (C) 2024 Intel Corporation
3+
* Copyright (C) 2024-2025 Intel Corporation
44
*
55
* Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
66
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
@@ -9,15 +9,10 @@
99

1010
#include "proxy_lib.h"
1111

12-
// The priority 102 is used, because the constructor should be called as the second one
13-
// (just after the first constructor of the base allocator with priority 101)
14-
// and the destructor as the last but one (just before the last destructor
15-
// of the base allocator with priority 101), because this library
16-
// provides the memory allocation API.
17-
void __attribute__((constructor(102))) proxy_lib_create(void) {
12+
void __attribute__((constructor)) proxy_lib_create(void) {
1813
proxy_lib_create_common();
1914
}
2015

21-
void __attribute__((destructor(102))) proxy_lib_destroy(void) {
16+
void __attribute__((destructor)) proxy_lib_destroy(void) {
2217
proxy_lib_destroy_common();
2318
}

0 commit comments

Comments
 (0)