From bccdbe4082b7939dff4d27d5b951498088e166e8 Mon Sep 17 00:00:00 2001 From: pi97tejy3 Date: Mon, 4 Jul 2022 20:31:19 +0800 Subject: [PATCH] post_message() sys_get_message --- message.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 message.c diff --git a/message.c b/message.c new file mode 100644 index 0000000..1081510 --- /dev/null +++ b/message.c @@ -0,0 +1,18 @@ +#include +#include +#include +#include +int volatile jumpp; +void post_message(int type){ + cli(); + if(jumpp<=10) + jumpp++; + sti(); + return; +} +int sys_get_message(struct message *msg) { + if(jumpp>0) --jumpp; + return jumpp; +} + + \ No newline at end of file