From f5beaf0c99b918425fa683e0085898a397109082 Mon Sep 17 00:00:00 2001 From: pthzwps2n <1572003858@qq.com> Date: Mon, 4 Jul 2022 15:47:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=88=E6=81=AF=E9=A9=B1=E5=8A=A8=E6=A1=86?= =?UTF-8?q?=E6=9E=B6post=5Fmessage=20sys=5Fget=5Fmessage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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