Linker functions
authorBarret Rhoden <brho@cs.berkeley.edu>
Wed, 22 Jan 2014 20:56:54 +0000 (12:56 -0800)
committerBarret Rhoden <brho@cs.berkeley.edu>
Wed, 22 Jan 2014 20:56:54 +0000 (12:56 -0800)
commit874a278e574e9014092468c0908525bc14459940
treee793b825379232ef3f2f0604097b6ce49ca76bc1
parentafc7335d6d67f64f8a047d60d2a7d09be51cc326
Linker functions

We can run functions automatically during kernel initialization.  If you
want a void foo(void) func to run, write it like this:

linker_func_2(foo)
{
bar();
}

The functions will run in any order within a level, and lower levels
will run before higher levels.
kern/include/linker_func.h [new file with mode: 0644]
kern/include/ns.h
kern/linker_tables.ld
kern/src/init.c
kern/src/testing.c