linux-lock-tracking-20070208
[openafs.git] / src / afs / afs_osi.h
index 771c122..c66ece8 100644 (file)
@@ -41,7 +41,6 @@ struct osi_socket {
 
 struct osi_stat {
     afs_int32 size;            /* file size in bytes */
-    afs_int32 blksize;         /* optimal transfer size in bytes */
     afs_int32 mtime;           /* modification date */
     afs_int32 atime;           /* access time */
 };
@@ -213,14 +212,18 @@ typedef struct timeval osi_timeval_t;
 /* should use curthread, but 'ps' can't display it */
 #define osi_ThreadUnique()     curproc
 #else
+#ifdef AFS_LINUX_ENV
+#define osi_ThreadUnique()     (current->pid)
+#else
 #define osi_ThreadUnique()     getpid()
 #endif
+#endif
 
 
 
 #ifdef AFS_GLOBAL_SUNLOCK
 #define AFS_ASSERT_GLOCK() \
-    (ISAFS_GLOCK() || (osi_Panic("afs global lock not held at %s:%d\n", __FILE__, __LINE__), 0))
+    do { if (!ISAFS_GLOCK()) osi_Panic("afs global lock not held at %s:%d\n", __FILE__, __LINE__); } while (0)
 #endif /* AFS_GLOBAL_SUNLOCK */
 
 #ifdef RX_ENABLE_LOCKS