afs: Properly type afs_osi_suser cred arg
[openafs.git] / src / afs / afs_osi.c
index 3eb176b..1289d22 100644 (file)
  *     -- On HP called from afsc_link.
  *     -- On SGI called from afs_init. */
 
+/* No hckernel-specific header for this prototype. */
+#ifndef UKERNEL
+extern void init_hckernel_mutex(void);
+#endif
+
 afs_lock_t afs_ftf;            /* flush text lock */
 
 #ifdef AFS_SGI53_ENV
@@ -78,6 +83,12 @@ osi_Init(void)
 
     osi_InitGlock();
 
+    /* Initialize a lock for the kernel hcrypto bits. */
+#ifndef UKERNEL
+    init_hckernel_mutex();
+#endif
+
+
     if (!afs_osicred_initialized) {
 #if defined(AFS_DARWIN80_ENV)
         afs_osi_ctxtp_initialized = 0;
@@ -127,6 +138,9 @@ afs_osi_MaskSignals(void)
 void
 afs_osi_UnmaskRxkSignals(void)
 {
+#ifdef AFS_LINUX22_ENV
+    osi_linux_unmaskrxk();
+#endif
 }
 
 /* Two hacks to try and fix afsdb */
@@ -196,73 +210,6 @@ afs_osi_Visible(void)
 #endif
 }
 
-#if !defined(AFS_LINUX20_ENV) && !defined(AFS_XBSD_ENV)
-/* set the real time */
-void
-afs_osi_SetTime(osi_timeval_t * atv)
-{
-#if defined(AFS_AIX32_ENV)
-    struct timestruc_t t;
-
-    t.tv_sec = atv->tv_sec;
-    t.tv_nsec = atv->tv_usec * 1000;
-    ksettimer(&t);             /*  Was -> settimer(TIMEOFDAY, &t); */
-#elif defined(AFS_SUN5_ENV)
-    stime(atv->tv_sec);
-#elif defined(AFS_SGI_ENV)
-    struct stimea {
-       sysarg_t time;
-    } sta;
-
-    AFS_GUNLOCK();
-    sta.time = atv->tv_sec;
-    stime(&sta);
-    AFS_GLOCK();
-#elif defined(AFS_DARWIN_ENV)
-#ifndef AFS_DARWIN80_ENV
-    AFS_GUNLOCK();
-    setthetime(atv);
-    AFS_GLOCK();
-#endif
-#else
-    /* stolen from kern_time.c */
-#ifndef        AFS_AUX_ENV
-    boottime.tv_sec += atv->tv_sec - time.tv_sec;
-#endif
-#ifdef AFS_HPUX_ENV
-    {
-#if !defined(AFS_HPUX1122_ENV)
-       /* drop the setting of the clock for now. spl7 is not
-        * known on hpux11.22
-        */
-       ulong_t s;
-       struct timeval t;
-       t.tv_sec = atv->tv_sec;
-       t.tv_usec = atv->tv_usec;
-       s = spl7();
-       time = t;
-       (void)splx(s);
-       resettodr(atv);
-#endif
-    }
-#else
-    {
-       int s;
-       s = splclock();
-       time = *atv;
-       (void)splx(s);
-    }
-    resettodr();
-#endif
-#ifdef AFS_AUX_ENV
-    logtchg(atv->tv_sec);
-#endif
-#endif /* AFS_DARWIN_ENV */
-    AFS_STATCNT(osi_SetTime);
-}
-#endif /* AFS_LINUX20_ENV */
-
-
 void
 shutdown_osi(void)
 {
@@ -316,7 +263,7 @@ shutdown_osisleep(void)
 
 #if !defined(AFS_OBSD_ENV) && !defined(AFS_NBSD40_ENV)
 int
-afs_osi_suser(void *cr)
+afs_osi_suser(afs_ucred_t *cr)
 {
 #if defined(AFS_SUN510_ENV)
     return (priv_policy(cr, PRIV_SYS_SUSER_COMPAT, B_FALSE, EPERM, NULL) == 0);