/*
* 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
#define _OSI_MACHDEP_H_
#include "h/kern_sem.h"
+#include "h/proc_iface.h"
#define afs_hz hz
extern struct timeval time;
#define osi_Time() (time.tv_sec)
-#define AFS_UCRED struct ucred
-#define AFS_PROC proc_t
+typedef struct ucred afs_ucred_t;
+typedef proc_t afs_proc_t;
-#define osi_vnhold(avc, r) do { VN_HOLD(AFSTOV(avc)); } while(0)
#define gop_rdwr(rw,gp,base,len,offset,segflg,unit,aresid) \
vn_rdwr((rw),(gp),(base),(len),(offset),(segflg),(unit),(aresid),0)
#define gop_lookupname(fnamep,segflg,followlink,compvpp) \
#define getppid() (afs_uint32)p_ppid(u.u_procp)
-#ifdef KERNEL
/*
- * Global lock support.
+ * Global lock support.
*
* HP uses global mutex to protect afs land
*/
#endif
/* Uses splnet only in the SP case */
-#define SPLVAR register ulong_t splvar
+#define SPLVAR ulong_t splvar
#define NETPRI NET_SPLNET(splvar)
#define USERPRI NET_SPLX(splvar)
-#endif /* KERNEL */
#if !defined(AFS_HPUX110_ENV)
-/*
+/*
* On HP, the global lock is an alpha semaphore, hence it is automatically
* released and reacquired aroubd a sleep() and wakeup().
*/
#include <vfs_vm.h>
#endif
+#define osi_procname(procname, size) strncpy(procname, "", size)
+
+static_inline void
+osi_GetTime(osi_timeval32_t *atv)
+{
+ struct timeval now;
+ uniqtime(&now);
+ atv->tv_sec = now.tv_sec;
+ atv->tv_usec = now.tv_usec;
+}
+
#endif /* _OSI_MACHDEP_H_ */