summaryrefslogtreecommitdiff
path: root/hang
diff options
context:
space:
mode:
authorGuillermo Ramos2011-08-10 22:43:05 +0200
committerGuillermo Ramos2011-08-10 22:43:05 +0200
commita722d196c465bae07075819a8bdfb9e9376d2651 (patch)
tree560016efba95aff18637c5c7ee8ce7b623cb931f /hang
parent00d5bce9f24e2114316bd1165ebdad05644b7365 (diff)
downloadlkm-a722d196c465bae07075819a8bdfb9e9376d2651.tar.gz
AƱadidos pidevice y hang
Diffstat (limited to 'hang')
-rw-r--r--hang/Makefile7
-rw-r--r--hang/hang1.c16
2 files changed, 23 insertions, 0 deletions
diff --git a/hang/Makefile b/hang/Makefile
new file mode 100644
index 0000000..75750d3
--- /dev/null
+++ b/hang/Makefile
@@ -0,0 +1,7 @@
+obj-m += hang1.o
+
+all:
+ make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
+
+clean:
+ make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
diff --git a/hang/hang1.c b/hang/hang1.c
new file mode 100644
index 0000000..b963281
--- /dev/null
+++ b/hang/hang1.c
@@ -0,0 +1,16 @@
+#include <linux/kernel.h>
+#include <linux/module.h>
+
+
+static int __init hang_init(void)
+{
+ while(1);
+ return 0;
+}
+
+static void __exit hang_exit(void)
+{
+}
+
+module_init(hang_init);
+module_exit(hang_exit);