linux: defer vcache evictions when sleep would be needed
[openafs.git] / src / afs / afs_osi.h
index b5e3b8f..548ead5 100644 (file)
@@ -37,6 +37,13 @@ struct xfs_inode_info {
 #include "h/mm.h"
 #endif
 
+#if defined(AFS_NBSD50_ENV)
+# if !defined(DEF_CADDR_T)
+typedef char * caddr_t;
+#define DEF_CADDR_T
+# endif
+#endif
+
 
 /* this is just a dummy type decl, we're really using struct sockets here */
 struct osi_socket {
@@ -117,12 +124,6 @@ struct afs_osi_WaitHandle {
 
 #define        osi_NPACKETS    20      /* number of cluster pkts to alloc */
 
-/*
- * Alloc declarations.
- */
-#if !defined(AFS_OBSD44_ENV) && !defined(AFS_NBSD_ENV)
-#define afs_osi_Alloc_NoSleep afs_osi_Alloc
-#endif
 
 /*
  * Default vnode related macros
@@ -139,7 +140,7 @@ extern struct vnodeops *afs_ops;
 #endif
 
 struct vcache;
-extern int osi_TryEvictVCache(struct vcache *, int *);
+extern int osi_TryEvictVCache(struct vcache *, int *, int);
 extern struct vcache *osi_NewVnode(void);
 extern void osi_PrePopulateVCache(struct vcache *);
 extern void osi_PostPopulateVCache(struct vcache *);
@@ -368,7 +369,7 @@ typedef struct timeval osi_timeval_t;
            uio_setrw((UIO),(RW));                              \
            CODE = uiomove((SRC),(LEN),(UIO));                  \
        } while(0)
-#elif defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
+#elif defined(AFS_DARWIN_ENV) || (defined(AFS_XBSD_ENV) && !defined(AFS_NBSD40_ENV))
 #define AFS_UIOMOVE(SRC,LEN,RW,UIO,CODE)                       \
        do {                                                    \
            (UIO)->uio_rw = (RW);                               \