afs: Always define our own osi_timeval32_t
[openafs.git] / src / afs / AIX / osi_machdep.h
index 1cc84a8..0c79c03 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright 2000, International Business Machines Corporation and others.
  * All Rights Reserved.
- * 
+ *
  * This software has been released under the terms of the IBM Public
  * License.  For details, see the LICENSE file in the top-level source
  * directory or online at http://www.openafs.org/dl/license10.html
@@ -31,12 +31,6 @@ typedef struct proc afs_proc_t;
 
 #define afs_bufferpages v.v_bufhw
 
-#define osi_vnhold(avc, r) do { (avc)->vrefCount++; } while (0)
-#undef AFS_FAST_HOLD
-#define AFS_FAST_HOLD(vp) (vp)->vrefCount++
-#undef AFS_FAST_RELE
-#define AFS_FAST_RELE(vp) (vp)->vrefCount--
-
 #undef gop_lookupname
 #define        gop_lookupname(fnamep,segflg,followlink,compvpp) \
        lookupvp((fnamep), (followlink), (compvpp), &afs_osi_cred)
@@ -84,4 +78,19 @@ extern simple_lock_data afs_global_lock;
        mutex_init(&afs_global_lock, "afs_global_lock", MUTEX_DEFAULT, NULL)
 #endif
 
+/* Reading the current proc name from kernelspace is difficult. It is
+ * probably possible via indexing into v.vb_proc, but for now don't bother.
+ * To actually obtain the proc name, look at afs_procsize_init and
+ * src/afs/AIX/osi_gcpags.c for how to look at the process list */
+#define osi_procname(procname, size) strncpy(procname, "", size)
+
+static_inline void
+osi_GetTime(osi_timeval32_t *atv)
+{
+    struct timestruc_t now;
+    curtime(&now);
+    atv->tv_sec = now.tv_sec;
+    atv->tv_usec = now.tv_nsec / 1000;
+}
+
 #endif /* _OSI_MACHDEP_H_ */