linux-lock-tracking-20070208
[openafs.git] / src / afs / afs_osi.h
index c8228f1..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
@@ -397,7 +400,7 @@ typedef struct timeval osi_timeval_t;
 #endif /* AFS_GLOBAL_SUNLOCK */
 
 #ifdef AFS_DARWIN80_ENV
-#define AFS_UIO_OFFSET(uio) (int)uio_offset(uio)
+#define AFS_UIO_OFFSET(uio) uio_offset(uio)
 #define AFS_UIO_RESID(uio) (int)uio_resid(uio)
 #define AFS_UIO_SETOFFSET(uio, off) uio_setoffset(uio, off)
 #define AFS_UIO_SETRESID(uio, val) uio_setresid(uio, val)