This commit is contained in:
2024-08-07 12:33:08 +02:00
commit c3391de3ee
20 changed files with 31174 additions and 0 deletions

1
ass03/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
Makefile

30
ass03/main.c Normal file
View File

@ -0,0 +1,30 @@
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/slab.h>
MODULE_LICENSE("GPL");
static __init int do_work(int my_int)
{
int i;
for (i = 0; i < my_int; i++)
udelay(10);
if (my_int < 10)
pr_info("We slept a long time");
return i * my_int;
}
static __init int my_init(void)
{
do_work(10);
return 0;
}
static __exit void my_exit(void)
{
}
module_init(my_init);
module_exit(my_exit);