Created
November 19, 2010 17:05
-
-
Save kerie/706788 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static int rwbuf_open(struct inode *node, struct file *filep) | |
{ | |
if(inuse==1) | |
return -1; | |
inuse=1; | |
printk(KERN_ALERT "open ok\n"); | |
return 0; | |
} | |
static int rwbuf_close(struct inode *node, struct file *filep) | |
{ | |
inuse = 0; | |
printk(KERN_ALERT "close ok\n"); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment