zoukankan      html  css  js  c++  java
  • system call

    close (user-space)-> syscall expcetion

        syscall ( linux2.6.29.4archmipskernelscall32-o32.S)  --------->  sys_exit(unsigned int fd)

             SYSCALL_DEFINE1(close, unsigned int, fd) (linux2.6.29.4fsopen.c)  ---------> int filp_close(struct file *filp, fl_owner_t id)

                     retval = filp_close(filp, files);  --------->  void fput(struct file *file)

                             fput(filp);  ---------> void __fput(struct file *file)

                                         __fput(file);  --------->  int (*release) (struct inode *, struct file *);

                                                 if (file->f_op && file->f_op->release) file->f_op->release(inode, file); 

                                                      

    That is said, when a device file is closed, the release function that it implements will be called insensibly.

                

  • 相关阅读:
    Ubuntu安装deepin wine版QQ
    解决anaconda安装cvxpy失败的方法
    1006
    一种不用参数交换两变量值的方法
    输入三位数,翻转输出
    一个简单的问题
    1006ac(转)
    1007(转)
    杭电oj1004 自写成功代码
    1004
  • 原文地址:https://www.cnblogs.com/lake-of-embedded-system/p/3492916.html
Copyright © 2011-2022 走看看