Subject: Re: itimer, pthreads, and checkpointing
To: Michael Graff <explorer@flame.org>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: tech-kern
Date: 11/16/1999 15:52:45
On 15 Nov 1999 18:46:53 -0800 
 Michael Graff <explorer@flame.org> wrote:

 > #include <stdio.h>
 > 
 > int foo = 0;
 > 
 > void
 > my_init(void)
 > {
 >         printf("foo == %d\n", foo);
 >         foo = 2;
 > }

It's even easier to do this w/ GCC.

void	my_init(void) __attribute__((__constructor__));
void	my_teardown(void) __attribute__((__destructor__));

...in the prototypes is all you need.

        -- Jason R. Thorpe <thorpej@nas.nasa.gov>