Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Jan 2001 12:16:07 -0800
From:      Alfred Perlstein <bright@wintelcom.net>
To:        John Baldwin <jhb@FreeBSD.ORG>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: SYSINIT for userland?
Message-ID:  <20010125121607.V26076@fw.wintelcom.net>
In-Reply-To: <XFMail.010125120754.jhb@FreeBSD.org>; from jhb@FreeBSD.ORG on Thu, Jan 25, 2001 at 12:07:54PM -0800
References:  <20010125115253.T26076@fw.wintelcom.net> <XFMail.010125120754.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
* John Baldwin <jhb@FreeBSD.ORG> [010125 12:09] wrote:
> 
> On 25-Jan-01 Alfred Perlstein wrote:
> > Has anyone done any work for FreeBSD or GNU C that allows for
> > SYSINITs in userland, meaning just having to specify a function
> > and arg to be called at a certain time during program startup?
> > 
> > I know you can do some evil magic with overloading special shared
> > object symbols, but it is evil magic. :)
> > 
> > Anyone know of another OS that supports this?  Any standards for
> > it on the way?
> 
> Use C++ with static instances of classes that have constructors.

I've got a pretty good idea of how it could be done in C++.  Have
a global list that each object adds itself to in sorted order (via
static constructor), the manipulation should be serialized, but
this still isn't a solution for C.

-- 
-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?20010125121607.V26076>