/*
- * Copyright 2000, International Business Machines Corporation and others.
+ * Copyrigh 2000, International Business Machines Corporation and others.
* All Rights Reserved.
*
* This software has been released under the terms of the IBM Public
#include <afsconfig.h>
#include "afs/param.h"
-RCSID
- ("$Header$");
#include "afs/sysincludes.h" /* Standard vendor system headers */
#include "afsincludes.h" /* Afs-based standard headers */
flid_t osi_flid;
#endif
-struct AFS_UCRED *afs_osi_credp;
+afs_ucred_t *afs_osi_credp;
#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
kmutex_t afs_global_lock;
long afs_global_owner;
#endif
-#if defined(AFS_OSF_ENV)
-simple_lock_data_t afs_global_lock;
-#endif
-
#if defined(AFS_DARWIN_ENV)
#ifdef AFS_DARWIN80_ENV
lck_mtx_t *afs_global_lock;
#if defined(AFS_XBSD_ENV) && !defined(AFS_FBSD50_ENV)
struct lock afs_global_lock;
-struct proc *afs_global_owner;
+afs_proc_t *afs_global_owner;
#endif
#ifdef AFS_FBSD50_ENV
struct mtx afs_global_mtx;
#endif
-#if defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV)
+#if defined(AFS_DARWIN_ENV)
thread_t afs_global_owner;
-#endif /* AFS_OSF_ENV */
+#endif /* AFS_DARWIN_ENV */
#if defined(AFS_AIX41_ENV)
simple_lock_data afs_global_lock;
#if defined(AFS_GLOBAL_SUNLOCK)
#if defined(AFS_SGI62_ENV)
mutex_init(&afs_global_lock, MUTEX_DEFAULT, "afs_global_lock");
-#elif defined(AFS_OSF_ENV)
- usimple_lock_init(&afs_global_lock);
- afs_global_owner = (thread_t) 0;
#elif defined(AFS_FBSD50_ENV)
+#if defined(AFS_FBSD80_ENV) && defined(WITNESS)
+ /* "lock_initalized" (sic) can panic, checks a flag bit
+ * is unset _before_ init */
+ memset(&afs_global_mtx, 0, sizeof(struct mtx));
+#endif
mtx_init(&afs_global_mtx, "AFS global lock", NULL, MTX_DEF);
#elif defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
#if !defined(AFS_DARWIN80_ENV)
/* Can't just invent one, must use crget() because of mutex */
afs_osi_credp = crdup(osi_curcred());
#else
- memset(&afs_osi_cred, 0, sizeof(struct AFS_UCRED));
+ memset(&afs_osi_cred, 0, sizeof(afs_ucred_t));
#if defined(AFS_LINUX26_ENV)
- afs_osi_cred.cr_group_info = groups_alloc(0);
+ afs_set_cr_group_info(&afs_osi_cred, groups_alloc(0));
#endif
#if defined(AFS_DARWIN80_ENV)
afs_osi_cred.cr_ref = 1; /* kauth_cred_get_ref needs 1 existing ref */
}
void
-afs_osi_UnmaskUserLoop()
+afs_osi_UnmaskUserLoop(void)
{
#ifdef AFS_DARWIN_ENV
afs_osi_fullSigRestore();
void
afs_osi_RxkRegister(void)
{
-#ifdef AFS_LINUX22_ENV
- osi_linux_rxkreg();
-#endif
}
/* procedure for making our processes as invisible as we can */
AFS_STATCNT(osi_Invisible);
}
+void
+afs_osi_Visible(void)
+{
+#if defined(AFS_SUN5_ENV)
+ curproc->p_flag &= ~SSYS;
+#elif defined(AFS_DARWIN80_ENV)
+#elif defined(AFS_DARWIN_ENV)
+ /* maybe call init_process instead? */
+ current_proc()->p_flag &= ~P_SYSTEM;
+#elif defined(AFS_XBSD_ENV)
+ curproc->p_flag &= ~P_SYSTEM;
+#endif
+}
-#if !defined(AFS_LINUX20_ENV) && !defined(AFS_FBSD_ENV)
+#if !defined(AFS_LINUX20_ENV) && !defined(AFS_XBSD_ENV)
/* set the real time */
void
afs_osi_SetTime(osi_timeval_t * atv)