|
DataMuseum.dkPresents historical artifacts from the history of: Commodore CBM-900 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Commodore CBM-900 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 2804 (0xaf4) Types: TextFile Notes: UNIX file Names: »inode.h«
└─⟦eafc30061⟧ Bits:30001199 Commodore 900 hard disk image └─⟦8281d0872⟧ UNIX Filesystem └─ ⟦294235107⟧ »vol3.fd« UNIX Filesystem └─ ⟦this⟧ »usr/include/inode.h« └─ ⟦this⟧ »usr/include/sys/inode.h« └─⟦f27320a65⟧ Bits:30001972 Commodore 900 hard disk image with partial source code └─⟦2d53db1df⟧ UNIX Filesystem └─ ⟦this⟧ »include/inode.h« └─ ⟦this⟧ »include/sys/inode.h« └─⟦eafc30061⟧ Bits:30001199 Commodore 900 hard disk image └─⟦5ec4c54f2⟧ UNIX Filesystem └─ ⟦this⟧ »usr/include/inode.h« └─ ⟦this⟧ »usr/include/sys/inode.h«
/* * Memory resident inodes. */ #ifndef INODE_H #define INODE_H #include <types.h> /* * Size of pipe buffer. */ #define PIPSIZE (ND*BSIZE) /* * File inode. */ typedef struct inode { dev_t i_dev; /* Device */ ino_t i_ino; /* Inode index */ int i_refc; /* Reference count */ unsigned i_lrt; /* Last reference time */ GATE i_gate; /* Gate */ int i_flag; /* Flags */ int i_mode; /* Mode and type */ int i_nlink; /* Number of links */ int i_uid; /* Owner's user id */ int i_gid; /* Owner's group id */ size_t i_size; /* Size of file in bytes */ union { daddr_t i_addr[13]; /* Disk addresses */ dev_t i_rdev; /* Real device */ struct { /* Pipes */ daddr_t ip_pipe[10]; int ip_pnc; int ip_prx; int ip_pwx; } i_p; } i_a; /* Addresses */ time_t i_atime; /* Last access time */ time_t i_mtime; /* Last modify time */ time_t i_ctime; /* Creation time */ } INODE; /* * Compatibility. */ #define i_pipe i_p.ip_pipe #define i_pnc i_p.ip_pnc #define i_prx i_p.ip_prx #define i_pwx i_p.ip_pwx /* * Flags. */ #define IFACC 0001 /* File has been accessed */ #define IFMOD 0002 /* File has been modified */ #define IFCRT 0004 /* File has been created */ #define IFMNT 0010 /* Contains mounted file system */ #define IFWFR 0020 /* Sleeping on pipe full */ #define IFWFW 0040 /* Sleeping on pipe empty */ #define IFEOF 0100 /* End of file on pipe */ /* * Permission bits. */ #define IPR 0000004 /* Read */ #define IPW 0000002 /* Write */ #define IPE 0000001 /* Execute */ /* * Bit for dup system call. */ #define DUP2 0100 #ifdef KERNEL /* * Macro functions. */ #define ilock(ip) lock(ip->i_gate) #define iunlock(ip) unlock(ip->i_gate) #define ilocked(ip) locked(ip->i_gate) #endif #ifdef KERNEL /* * Functions to set modify time. */ #define iacc(ip) { \ ip->i_flag |= IFACC; \ ip->i_atime = timer.t_time; \ } #define imod(ip) { \ ip->i_flag |= IFMOD; \ ip->i_mtime = timer.t_time; \ } #define icrt(ip) { \ ip->i_flag |= IFCRT; \ ip->i_ctime = timer.t_time; \ } #define iamc(ip) { \ ip->i_flag |= IFACC|IFMOD|IFCRT; \ ip->i_atime = timer.t_time; \ ip->i_mtime = timer.t_time; \ ip->i_ctime = timer.t_time; \ } #endif #ifdef KERNEL /* * Functions. */ extern INODE *exlopen(); /* exec.c */ extern INODE *ftoim(); /* fs1.c */ extern INODE *imake(); /* fs1.c */ extern INODE *iattach(); /* fs1.c */ extern INODE *ialloc(); /* fs2.c */ extern daddr_t balloc(); /* fs2.c */ extern INODE *pmake(); /* pipe.c */ #endif #ifdef KERNEL /* * Global variables. */ extern int ronflag; /* Root is read only */ extern INODE *inodep; /* Pointer to in core inodes */ extern INODE *acctip; /* Accounting file pointer */ #endif #endif