Commit 0dfccf7e authored by Henning Schild's avatar Henning Schild Committed by Philippe Gerum

Revert "boilerplate/setup: introduce destructors for __setup_call"

In fact we would need real destructors for all setup_descriptor s. Stop
pretending that we know how to dlclose or destruct.

This reverts commit 5511e760.
parent d18c8ad0
......@@ -78,16 +78,10 @@ struct setup_descriptor {
#define __early_ctor __attribute__ ((constructor(210)))
#define __bootstrap_ctor __attribute__ ((constructor(220)))
#define __setup_dtor __attribute__ ((destructor(200)))
#define __setup_call(__name, __id) \
static __setup_ctor void __declare_ ## __name(void) \
{ \
__register_setup_call(&(__name), __id); \
} \
static __setup_dtor void __undeclare_ ## __name(void) \
{ \
__unregister_setup_call(&(__name), __id); \
}
#define core_setup_call(__name) __setup_call(__name, 0)
......@@ -102,7 +96,6 @@ extern "C" {
#endif
void __register_setup_call(struct setup_descriptor *p, int id);
void __unregister_setup_call(struct setup_descriptor *p, int id);
extern pid_t __node_id;
......
......@@ -701,12 +701,6 @@ void __register_setup_call(struct setup_descriptor *p, int id)
pvlist_prepend(&p->__reserved.next, &setup_list);
}
void __unregister_setup_call(struct setup_descriptor *p, int id)
{
pvlist_remove(&p->__reserved.next);
}
const char *get_program_name(void)
{
return basename(__base_setup_data.arg0 ?: "program");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment