xref: /minix3/minix/servers/vfs/lock.h (revision 433d6423c39e34ec4b79c950597bb2d236f886be)
1*433d6423SLionel Sambuc #ifndef __VFS_LOCK_H__
2*433d6423SLionel Sambuc #define __VFS_LOCK_H__
3*433d6423SLionel Sambuc 
4*433d6423SLionel Sambuc /* This is the file locking table.  Like the filp table, it points to the
5*433d6423SLionel Sambuc  * inode table, however, in this case to achieve advisory locking.
6*433d6423SLionel Sambuc  */
7*433d6423SLionel Sambuc EXTERN struct file_lock {
8*433d6423SLionel Sambuc   short lock_type;		/* F_RDLOCK or F_WRLOCK; 0 means unused slot */
9*433d6423SLionel Sambuc   pid_t lock_pid;		/* pid of the process holding the lock */
10*433d6423SLionel Sambuc   struct vnode *lock_vnode;
11*433d6423SLionel Sambuc   off_t lock_first;		/* offset of first byte locked */
12*433d6423SLionel Sambuc   off_t lock_last;		/* offset of last byte locked */
13*433d6423SLionel Sambuc } file_lock[NR_LOCKS];
14*433d6423SLionel Sambuc 
15*433d6423SLionel Sambuc #endif
16