]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
freebsd-5-20030404
authorJim Rees <rees@umich.edu>
Fri, 4 Apr 2003 19:04:22 +0000 (19:04 +0000)
committerJim Rees <rees@umich.edu>
Fri, 4 Apr 2003 19:04:22 +0000 (19:04 +0000)
preliminary work on freebsd 5.0 kernel module

src/afs/FBSD/osi_machdep.h
src/afs/sysincludes.h
src/config/param.i386_fbsd_50.h

index b134ad6d19f675f1c247d474887ddf8304a8df64..2dfa67b2e18944752e4a3c727c66db1756589a38 100644 (file)
@@ -50,8 +50,29 @@ extern struct simplelock afs_rxglobal_lock;
 #undef afs_suser
 
 #ifdef KERNEL
-extern struct proc * afs_global_owner;
 extern struct lock afs_global_lock;
+#if defined(AFS_FBSD50_ENV)
+#define VT_AFS         "afs"
+#define VROOT          VV_ROOT
+#define v_flag         v_vflag
+extern struct thread * afs_global_owner;
+#define AFS_GLOCK() \
+    do { \
+        osi_Assert(curthread); \
+       lockmgr(&afs_global_lock, LK_EXCLUSIVE, 0, curthread); \
+        osi_Assert(afs_global_owner == 0); \
+       afs_global_owner = curthread; \
+    } while (0)
+#define AFS_GUNLOCK() \
+    do { \
+        osi_Assert(curthread); \
+       osi_Assert(afs_global_owner == curthread); \
+        afs_global_owner = 0; \
+        lockmgr(&afs_global_lock, LK_RELEASE, 0, curthread); \
+    } while(0)
+#define ISAFS_GLOCK() (afs_global_owner == curthread && curthread)
+#else /* FBSD50 */
+extern struct proc * afs_global_owner;
 #define AFS_GLOCK() \
     do { \
         osi_Assert(curproc); \
@@ -67,6 +88,7 @@ extern struct lock afs_global_lock;
         lockmgr(&afs_global_lock, LK_RELEASE, 0, curproc); \
     } while(0)
 #define ISAFS_GLOCK() (afs_global_owner == curproc && curproc)
+#endif /* FBSD50 */
 #define AFS_RXGLOCK()
 #define AFS_RXGUNLOCK()
 #define ISAFS_RXGLOCK() 1
index ac712c06bc7310650b85d453661fe672cbd9911a..f40f4ba2d4776371941a1498ece727ee2d42da98 100644 (file)
@@ -198,6 +198,9 @@ typedef unsigned short                  etap_event_t;
 #include "h/user.h"
 #endif /* AFS_SGI64_ENV */
 #define        MACH_USER_API   1
+#if defined(AFS_FBSD50_ENV)
+#include "h/bio.h"
+#endif
 #include "h/file.h"
 #include "h/uio.h"
 #include "h/buf.h"
index d58ea4b5416d292abfd7749efa0fcd04a8e9ea74..4accf884e55f2d84599f886dec5c7d49f38ce93a 100644 (file)
@@ -29,7 +29,6 @@
 #define AFS_X86_FBSD50_ENV 1
 #define AFS_X86_ENV 1
 #define AFS_NONFSTRANS 1
-#define O_SYNC O_FSYNC
 #define FTRUNC O_TRUNC
 
 #define IUPD 0x0010