#endif
static char memZero; /* address of 0 bytes for kmem_alloc */
-extern int afs_osicred_initialized;
struct osimem {
struct osimem *next;
flid_t osi_flid;
#endif
-void osi_Init()
+void osi_Init(void)
{
static int once = 0;
if (once++ > 0) /* just in case */
#endif
}
-osi_Active(avc)
-register struct vcache *avc; {
+int osi_Active(register struct vcache *avc)
+{
AFS_STATCNT(osi_Active);
#if defined(AFS_SUN_ENV) || defined(AFS_AIX_ENV) || defined(AFS_OSF_ENV) || defined(AFS_SUN5_ENV) || (AFS_LINUX20_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
if ((avc->opens > 0) || (avc->states & CMAPPED)) return 1; /* XXX: Warning, verify this XXX */
avc->pvnLock is already held, avc->lock is guaranteed not to be held (by
us, of course).
*/
-void osi_FlushPages(avc, credp)
- register struct vcache *avc;
- struct AFS_UCRED *credp;
+void osi_FlushPages(register struct vcache *avc, struct AFS_UCRED *credp)
{
afs_hyper_t origDV;
ObtainReadLock(&avc->lock);
* shouldn't do anything that would discard newly written data before
* it is written to the file system. */
-void osi_FlushText_really(vp)
- register struct vcache *vp; {
+void osi_FlushText_really(register struct vcache *vp)
+{
afs_hyper_t fdv; /* version before which we'll flush */
AFS_STATCNT(osi_FlushText);
* cacheinval(). But they would panic. So it might be worth looking
* into some middle ground...
*/
-static void
-afs_gfs_FlushText(vp)
- register struct vcache *vp; {
+static void afs_gfs_FlushText(register struct vcache *vp)
+{
afs_hyper_t fdv; /* version before which we'll flush */
register struct text *xp;
struct gnode * gp;
return;
}
}
- else xp = (struct text *) 0;
+ else xp = NULL;
if (gp->g_flag & GTEXT) {/* still has a text object? */
xinval(gp);
#endif /* AFS_TEXT_ENV */
/* mask signals in afsds */
-void afs_osi_MaskSignals(){
+void afs_osi_MaskSignals(void)
+{
#ifdef AFS_LINUX22_ENV
osi_linux_mask();
#endif
}
/* unmask signals in rxk listener */
-void afs_osi_UnmaskRxkSignals(){
+void afs_osi_UnmaskRxkSignals(void)
+{
#ifdef AFS_LINUX22_ENV
osi_linux_unmask();
#endif
}
/* register rxk listener proc info */
-void afs_osi_RxkRegister(){
+void afs_osi_RxkRegister(void)
+{
#ifdef AFS_LINUX22_ENV
osi_linux_rxkreg();
#endif
}
/* procedure for making our processes as invisible as we can */
-void afs_osi_Invisible() {
+void afs_osi_Invisible(void)
+{
#ifdef AFS_LINUX22_ENV
afs_osi_MaskSignals();
#endif
#ifndef AFS_LINUX20_ENV /* Linux version in osi_misc.c */
/* set the real time */
-afs_osi_SetTime(atv)
- register osi_timeval_t *atv; {
-
+int afs_osi_SetTime(register osi_timeval_t *atv)
+{
#ifdef AFS_AIX32_ENV
struct timestruc_t t;
struct stimea {
time_t time;
} sta;
- extern int stime(struct stimea *time, rval_t *rvp);
sta.time = atv->tv_sec;
struct stimea {
sysarg_t time;
} sta;
- extern int stime(struct stimea *time);
AFS_GUNLOCK();
sta.time = atv->tv_sec;
/* does not impliment security features of kern_time.c:settime() */
struct timespec ts;
struct timeval tv,delta;
- extern void (*lease_updatetime)();
int s;
AFS_GUNLOCK();
s=splclock();
* correctly (or at least, not to introduce worse bugs than already exist)
*/
#ifdef notdef
-int
-osi_VMDirty_p(avc)
- struct vcache *avc;
+int osi_VMDirty_p(struct vcache *avc)
{
int dirtyPages;
if (avc->vmh) {
unsigned int pagef, pri, index, next;
- extern struct vmkerdata vmker;
index = VMHASH(avc->vmh);
if (scb_valid(index)) { /* could almost be an ASSERT */
*
* Locking: the vcache entry lock is held. It is dropped and re-obtained.
*/
-void
-osi_ReleaseVM(avc, acred)
- struct vcache *avc;
- struct AFS_UCRED *acred;
+void osi_ReleaseVM(struct vcache *avc, struct AFS_UCRED *acred)
{
#ifdef AFS_SUN5_ENV
AFS_GUNLOCK();
}
-void shutdown_osi()
+void shutdown_osi(void)
{
- extern int afs_cold_shutdown;
-
AFS_STATCNT(shutdown_osi);
if (afs_cold_shutdown) {
LOCK_INIT(&afs_ftf, "afs_ftf");
}
}
-afs_osi_suser(credp)
- void * credp;
+int afs_osi_suser(void *credp)
{
#ifdef AFS_SUN5_ENV
return afs_suser(credp);
*/
#if defined(AFS_SUN5_ENV)
-void afs_osi_TraverseProcTable()
+void afs_osi_TraverseProcTable(void)
{
struct proc *prp;
for (prp = practive; prp != NULL; prp = prp->p_next) {
* changes. To be safe, we use both.
*/
-void afs_osi_TraverseProcTable()
+void afs_osi_TraverseProcTable(void)
{
register proc_t *p;
int endchain = 0;
}
#endif /* AFS_SGI65_ENV */
-void afs_osi_TraverseProcTable()
+void afs_osi_TraverseProcTable(void)
{
procscan(SGI_ProcScanFunc, afs_GCPAGs_perproc_func);
}
#endif /* AFS_SGI_ENV */
#if defined(AFS_AIX_ENV)
-void afs_osi_TraverseProcTable()
+void afs_osi_TraverseProcTable(void)
{
struct proc *p;
int i;
#endif
#if defined(AFS_OSF_ENV)
-void afs_osi_TraverseProcTable()
+void afs_osi_TraverseProcTable(void)
{
struct pid_entry *pe;
#ifdef AFS_DUX50_ENV
-extern struct pid_entry *pidtab;
-extern int npid;
#define pidNPID (pidtab + npid)
#define PID_LOCK()
#define PID_UNLOCK()
#endif
#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
-void afs_osi_TraverseProcTable()
+void afs_osi_TraverseProcTable(void)
{
struct proc *p;
LIST_FOREACH(p, &allproc, p_list) {
*/
#if defined(AFS_SGI65_ENV)
-const struct AFS_UCRED *afs_osi_proc2cred(AFS_PROC *pr)
+const struct AFS_UCRED *afs_osi_proc2cred(AFS_PROC *p)
{
return NULL;
}
#elif defined(AFS_HPUX_ENV)
-const struct AFS_UCRED *afs_osi_proc2cred(proc_t *p)
+const struct AFS_UCRED *afs_osi_proc2cred(AFS_PROC *p)
{
if (!p)
return;
/* GLOBAL DECLARATIONS */
-extern int xmattach(); /* fills out cross memory descriptor */
-extern int xmdetach(); /* decrements reference count to segment */
-
/*
* LOCKS: the caller must do
* simple_lock(&proc_tbl_lock);