相关文章  
  • 做个好杀手Linux的Kill命令与信号(3)
  • Linux系统环境进程间通信:信号灯(5)
  • Linux系统环境进程间通信:信号灯(3)
  • Linux系统环境进程间通信:信号灯(4)
  • Linux系统环境进程间通信:信号灯(1)
  • Linux系统环境进程间通信:信号灯(2)
  • Linux系统内核的同步机制-自旋锁(2)
  • Linux系统内核的同步机制-自旋锁(1)
  • 介绍Linux系统内核文件Cache管理机制(1)
  • Linux操作系统下的离线浏览器介绍(2)
  •   推荐  
      科普之友首页   专利     科普      动物      植物        天文   考古   前沿科技
     您现在的位置在:  首页 >>文献 >>培训

    深入浅出Linux设备驱动之并发控制(3)5

    node *inode, struct file *filp) {  globalvar_count--;  return 0; } static ssize_t globalvar_read(struct file *filp, char *buf, size_t len, loff_t *off) {  if (down_interruptible(&sem))  {   return - ERESTARTSYS;  }  if (copy_to_user(buf, &global_var, sizeof(int)))  {   up(&sem);   return - EFAULT;  }  up(&sem);  return sizeof(int); } static ssize_t globalvar_write(struct file *filp, const char *buf, size_t len, loff_t

    页码:[1] [2] [3] [4] [5] [6] [7]5页、共7页

         

          设为首页       |       加入收藏       |       广告服务       |       友情链接       |       版权申明      

    Copyriht 2007 - 2008 ©  科普之友 All right reserved