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.

                

  • 相关阅读:
    Python 队列
    Python 栈
    Python面试百题
    TCP:四次挥手
    TCP:三次握手
    SQL:八 SQL高级处理
    SQL:七 集合运算
    SQL:六 函数、谓词、CASE表达式
    SQL:五 复杂查询
    python爬虫——爬取网页数据和解析数据
  • 原文地址:https://www.cnblogs.com/lake-of-embedded-system/p/3492916.html
Copyright © 2011-2022 走看看