+
+#define ILOCK(ip) { \
+ while ((ip)->i_flag & ILOCKED) { \
+ (ip)->i_flag |= IWANT; \
+ sleep((caddr_t)(ip), PINOD); \
+ } \
+ (ip)->i_flag |= ILOCKED; \
+}
+
+#define IUNLOCK(ip) { \
+ (ip)->i_flag &= ~ILOCKED; \
+ if ((ip)->i_flag&IWANT) { \
+ (ip)->i_flag &= ~IWANT; \
+ wakeup((caddr_t)(ip)); \
+ } \
+}
+
+#define IUPDAT(ip, t1, t2, waitfor) { \
+ if (ip->i_flag&(IUPD|IACC|ICHG)) \
+ iupdat(ip, t1, t2, waitfor); \
+}