}
/*
- * It is a constructor, which means that it will automatically be called before
- * main(). This is GCC-specific but it works at least since 2.95.
- * Special care must be taken so that it does not need any uninitialized data.
+ * Registers the poller.
*/
-__attribute__((constructor))
static void _do_register(void)
{
struct poller *p;
p->fork = _do_fork;
}
+INITCALL0(STG_REGISTER, _do_register);
+
/*
* Local variables:
}
/*
- * This constructor must be called before main() to register the event ports
- * poller.
+ * Registers the poller.
*/
-__attribute__((constructor))
static void _do_register(void)
{
struct poller *p;
p->poll = _do_poll;
p->fork = _do_fork;
}
+
+INITCALL0(STG_REGISTER, _do_register);
}
/*
- * It is a constructor, which means that it will automatically be called before
- * main(). This is GCC-specific but it works at least since 2.95.
- * Special care must be taken so that it does not need any uninitialized data.
+ * Registers the poller.
*/
-__attribute__((constructor))
static void _do_register(void)
{
struct poller *p;
p->fork = _do_fork;
}
+INITCALL0(STG_REGISTER, _do_register);
/*
* Local variables:
}
/*
- * It is a constructor, which means that it will automatically be called before
- * main(). This is GCC-specific but it works at least since 2.95.
- * Special care must be taken so that it does not need any uninitialized data.
+ * Registers the poller.
*/
-__attribute__((constructor))
static void _do_register(void)
{
struct poller *p;
p->poll = _do_poll;
}
+INITCALL0(STG_REGISTER, _do_register);
/*
* Local variables:
}
/*
- * It is a constructor, which means that it will automatically be called before
- * main(). This is GCC-specific but it works at least since 2.95.
- * Special care must be taken so that it does not need any uninitialized data.
+ * Registers the poller.
*/
-__attribute__((constructor))
static void _do_register(void)
{
struct poller *p;
p->poll = _do_poll;
}
+INITCALL0(STG_REGISTER, _do_register);
/*
* Local variables: