Date: Thu, 25 Jan 2001 12:19:59 -0800 From: Alfred Perlstein <bright@wintelcom.net> To: "Alexander N. Kabaev" <ak03@gte.com> Cc: hackers@FreeBSD.ORG Subject: Re: SYSINIT for userland? Message-ID: <20010125121959.W26076@fw.wintelcom.net> In-Reply-To: <XFMail.20010125151609.ak03@gte.com>; from ak03@gte.com on Thu, Jan 25, 2001 at 03:16:09PM -0500 References: <20010125115253.T26076@fw.wintelcom.net> <XFMail.20010125151609.ak03@gte.com>
next in thread | previous in thread | raw e-mail | index | archive | help
* Alexander N. Kabaev <ak03@gte.com> [010125 12:16] wrote: > Will functions marked with __attribute__((__constructor__)) or > __attribute__((__destructor__)) satisfy your needs? > Compiler will insert calls to these functions gets into .init section of the > resulting ELF module which in turn will be called automatically at the program > startup time. I do not remember exactly, but there might be even priority > parameter you can specify with these attributes to manage the order in which > these functions will be called. Actually, the order can be kludged by just having these __constructors__ sort themselves into a list. Then all you need is a function call in main() to actually start these puppies up. :) It's still a bit off what I was looking for which would be putting these hooks into shared libaries hinged on pthread initialization, dns init, etc... -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] "I have the heart of a child; I keep it in a jar on my desk." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010125121959.W26076>