On Mon, 2010-08-23 at 07:48 -0400, Brian Gerst wrote:
Please don't do any such thing, its impossible to use correctly.
Suppose there are two modular users, A and B.
Both have something like:
extern void (*fptr)(void);
static void (*old_fptr)(void);
static void func(void)
{
/* foo */
if (old_fptr)
old_fptr();
}
module_init()
{
old_fptr = fptr;
fptr = A_func;
}
Then you load A, load B and unload A, then guess what happens?
--