消息驱动框架post_message sys_get_message

master
pthzwps2n 2 years ago
parent 87b03e27ad
commit f5beaf0c99

@ -0,0 +1,18 @@
#include<linux/sched.h>
#include<asm/segment.h>
#include <asm/system.h>
#include<all.h>
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;
}
Loading…
Cancel
Save