[Libsysio-commit] HEAD: libsysio/include inode.h
Brought to you by:
lward
From: Lee W. <lw...@us...> - 2009-08-17 22:56:56
|
Update of /cvsroot/libsysio/libsysio/include In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv31324 Modified Files: inode.h Log Message: Moved I_ISASSOC and I_GONE up. Switched _I_RELE_NO_LOCK to use the I_GONE macro instead of calling _sysio_i_gone directly. Index: inode.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/include/inode.h,v retrieving revision 1.59 retrieving revision 1.60 diff -u -w -b -B -p -r1.59 -r1.60 --- inode.h 17 Aug 2009 17:45:09 -0000 1.59 +++ inode.h 17 Aug 2009 22:56:45 -0000 1.60 @@ -171,6 +171,20 @@ struct inode { #endif /* + * Check association; Logical true if so, otherwise false. + * + * NB: The given i-node should be locked or otherwise protected from + * manipulation by others. + */ +#ifdef I_ASSOCIATIONS +#define I_ISASSOC(_ino) \ + ((_ino)->i_assoc.lh_first) +#else +#define I_ISASSOC(_ino) \ + (0) +#endif + +/* * Init an i-node record. */ #define I_INIT(ino, fs, stat, ops, fid, immunity, private) \ @@ -201,6 +215,15 @@ struct inode { #define _I_CHECK_LOCK(_ino, _test) #endif +/* + * Attempt to kill an inode. + */ +#define I_GONE(_ino) \ + do { \ + _I_CHECK_LOCK((_ino), 1); \ + _sysio_i_gone(_ino); \ + } while (0) + #define I_LOCK(_ino) \ do { \ mutex_lock(&(_ino)->i_mutex); \ @@ -241,7 +264,7 @@ struct inode { _I_CHECK_LOCK((_ino), 1); \ assert((_ino)->i_ref); \ if (!--(_ino)->i_ref && (_ino)->i_zombie) \ - _sysio_i_gone((_ino)); \ + I_GONE(_ino); \ } while (0) #define I_RELE(_ino) \ @@ -270,29 +293,6 @@ struct inode { } while (0) /* - * Attempt to kill an inode. - */ -#define I_GONE(_ino) \ - do { \ - _I_CHECK_LOCK((_ino), 1); \ - _sysio_i_gone(_ino); \ - } while (0) - -/* - * Check association; Logical true if so, otherwise false. - * - * NB: The given i-node should be locked or otherwise protected from - * manipulation by others. - */ -#ifdef I_ASSOCIATIONS -#define I_ISASSOC(_ino) \ - ((_ino)->i_assoc.lh_first) -#else -#define I_ISASSOC(_ino) \ - (0) -#endif - -/* * The "quick string" record (inspired by the structure of the same name * from Linux) is used to pass a string without delimiters as well as useful * information about the string. |