" +#define DRIVER_DESC "A sample driver" + + +static int __init hello4_init_function(void) +{ + printk(KERN_ALERT "Hello, world 4\n"); + return 0; +} + + +static void __exit hello4_cleanup_function(void) +{ + printk(KERN_ALERT "Goodbye, world 4\n"); +} + + +module_init(hello4_init_function); +module_exit(hello4_cleanup_function); + +/* You can use strings here or a define, as shown. It doesn't matter what you + * actually name the #define's, so "AUTHOR" is as good as "DRIVER_AUTHOR". */ +MODULE_AUTHOR(DRIVER_AUTHOR); +MODULE_DESCRIPTION(DRIVER_DESC); + +/* This gets rid of the "taint message" by declaring this code as GPL. */ +MODULE_LICENSE("GPL"); + +/* This says that the module uses /dev/testdevice. It might be used in the + * future to help automatic configuration of modules, but is currently unused + * other than documentation purposes. */ +MODULE_SUPPORTED_DEVICE("testdevice"); +]]>
Not right now, I'm busy.. But if you're a kernel module and you're + bothered by a process, you have another possibility. You can put the + process to sleep until you can service it. After all, processes are + being put to sleep by the kernel and woken up all the time (that's the + way multiple processes appear to run on the same time on a single + CPU). +Go + away!
housekeeping+
bottom half) +