The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

Интерактивная система просмотра системных руководств (man-ов)

 ТемаНаборКатегория 
 
 [Cписок руководств | Печать]

VOP_CLOSE (9)
  • >> VOP_CLOSE (9) ( FreeBSD man: Ядро )

  • BSD mandoc
     

    NAME

    VOP_OPEN
    
     
    VOP_CLOSE
    
     - open or close a file
    
     
    

    SYNOPSIS

       #include <sys/param.h>
       #include <sys/vnode.h>
    int VOP_OPEN (struct vnode *vp int mode struct ucred *cred struct thread *td struct file *fp);
    int VOP_CLOSE (struct vnode *vp int mode struct ucred *cred struct thread *td);
     

    DESCRIPTION

    The VOP_OPEN ();
    entry point is called before a file is accessed by a process and the VOP_CLOSE ();
    entry point is called after a file is finished with by the process.

    The arguments are:

    Fa vp
    The vnode of the file.
    Fa mode
    The access mode required by the calling process.
    Fa td
    The thread which is accessing the file.
    Fa fp
    The file being opened.

    Pointer to the file Fa fp is useful for file systems which require such information, e.g., fdescfs(5). Use `NULL' as Fa fp argument to VOP_OPEN ();
    for in-kernel opens.

    The access mode is a set of flags, including FREAD FWRITE O_NONBLOCK O_APPEND  

    LOCKS

    VOP_OPEN ();
    expects Fa vp to be locked on entry and will leave it locked on return.

    VOP_CLOSE ();
    expects at least a reference to be associated with the vnode and does not care whether the vnode is locked or not. The lock and reference state is left unchanged on return. Note that Fa vn_close expects an unlocked, referenced vnode and will dereference the vnode prior to returning.  

    RETURN VALUES

    Zero is returned on success, otherwise an error code is returned.  

    PSEUDOCODE

    int
    vop_open(struct vnode *vp, int mode, struct ucred *cred, struct thread *td,
        struct file *fp)
    {
        /*
         * Most file systems don't do much here.
         */
        return 0;
    }
    
     

    SEE ALSO

    vnode(9), VOP_LOOKUP9  

    AUTHORS

    This manual page was written by An Doug Rabson .


     

    Index

    NAME
    SYNOPSIS
    DESCRIPTION
    LOCKS
    RETURN VALUES
    PSEUDOCODE
    SEE ALSO
    AUTHORS


    Поиск по тексту MAN-ов: 




    Партнёры:
    PostgresPro
    Inferno Solutions
    Hosting by Hoster.ru
    Хостинг:

    Закладки на сайте
    Проследить за страницей
    Created 1996-2024 by Maxim Chirkov
    Добавить, Поддержать, Вебмастеру