* -- 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
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;
/* Can't just invent one, must use crget() because of mutex */
afs_osi_credp =
crdup(osi_curcred());
+#elif defined(AFS_SUN5_ENV)
+ afs_osi_credp = kcred;
#else
memset(&afs_osi_cred, 0, sizeof(afs_ucred_t));
#if defined(AFS_LINUX26_ENV)
void
afs_osi_UnmaskRxkSignals(void)
{
+#ifdef AFS_LINUX22_ENV
+ osi_linux_unmaskrxk();
+#endif
}
/* Two hacks to try and fix afsdb */
#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)
{