struct afs_icl_set *afs_iclSetp = (struct afs_icl_set*)0;
struct afs_icl_set *afs_iclLongTermSetp = (struct afs_icl_set*)0;
-#if defined(AFS_GLOBAL_SUNLOCK) && !defined(AFS_HPUX_ENV) && !defined(AFS_AIX41_ENV) && !defined(AFS_OSF_ENV) && !defined(AFS_LINUX22_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_FBSD_ENV)
-
+#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
kmutex_t afs_global_lock;
kmutex_t afs_rxglobal_lock;
+#endif
#if defined(AFS_SGI_ENV) && !defined(AFS_SGI64_ENV)
long afs_global_owner;
#endif
-#endif
#if defined(AFS_OSF_ENV)
simple_lock_data_t afs_global_lock;
-#elif defined(AFS_DARWIN_ENV)
+#endif
+
+#if defined(AFS_DARWIN_ENV)
struct lock__bsd__ afs_global_lock;
-#elif defined(AFS_FBSD_ENV)
+#endif
+
+#if defined(AFS_FBSD_ENV)
struct lock afs_global_lock;
struct proc *afs_global_owner;
#endif
+
#if defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV)
thread_t afs_global_owner;
#endif /* AFS_OSF_ENV */
} else
afs_shutdown();
}
-
-#if ! defined(AFS_HPUX90_ENV) || defined(AFS_HPUX100_ENV)
else if (parm == AFSOP_AFS_VFSMOUNT) {
#ifdef AFS_HPUX_ENV
-#if defined(AFS_HPUX100_ENV)
vfsmount(parm2, parm3, parm4, parm5);
-#else
- afs_vfs_mount(parm2, parm3, parm4, parm5);
-#endif /* AFS_HPUX100_ENV */
#else /* defined(AFS_HPUX_ENV) */
#if defined(KERNEL_HAVE_SETUERROR)
setuerror(EINVAL);
#endif
#endif /* defined(AFS_HPUX_ENV) */
}
-#endif
else if (parm == AFSOP_CLOSEWAIT) {
afs_SynchronousCloses = 'S';
}
};
#endif
-Afs_syscall (uap, rvp)
- register struct afssysa *uap;
- rval_t *rvp;
+Afs_syscall(register struct afssysa *uap, rval_t *rvp)
{
int *retval = &rvp->r_val1;
#else /* AFS_SUN5_ENV */
logp->logSize = ICL_DEFAULT_LOGSIZE;
}
logp->datap = (afs_int32 *) afs_osi_Alloc(sizeof(afs_int32) * logp->logSize);
-#ifdef AFS_AIX32_ENV
+#ifdef KERNEL_HAVE_PIN
pin((char *)logp->datap, sizeof(afs_int32) * logp->logSize);
#endif
}
if (--logp->setCount == 0) {
/* no more users -- free it (but keep log structure around)*/
afs_osi_Free(logp->datap, sizeof(afs_int32) * logp->logSize);
-#ifdef AFS_AIX32_ENV
+#ifdef KERNEL_HAVE_PIN
unpin((char *)logp->datap, sizeof(afs_int32) * logp->logSize);
#endif
logp->firstUsed = logp->firstFree = 0;
/* free and allocate a new one */
afs_osi_Free(logp->datap, sizeof(afs_int32) * logp->logSize);
-#ifdef AFS_AIX32_ENV
+#ifdef KERNEL_HAVE_PIN
unpin((char *)logp->datap, sizeof(afs_int32) * logp->logSize);
#endif
logp->datap = (afs_int32 *) afs_osi_Alloc(sizeof(afs_int32) * logSize);
-#ifdef AFS_AIX32_ENV
+#ifdef KERNEL_HAVE_PIN
pin((char *)logp->datap, sizeof(afs_int32) * logSize);
#endif
logp->logSize = logSize;
strcpy(setp->name, name);
setp->nevents = ICL_DEFAULTEVENTS;
setp->eventFlags = afs_osi_Alloc(ICL_DEFAULTEVENTS);
-#ifdef AFS_AIX32_ENV
+#ifdef KERNEL_HAVE_PIN
pin((char *)setp->eventFlags, ICL_DEFAULTEVENTS);
#endif
for(i=0; i<ICL_DEFAULTEVENTS; i++)
*lpp = setp->nextp;
osi_FreeSmallSpace(setp->name);
afs_osi_Free(setp->eventFlags, ICL_DEFAULTEVENTS);
-#ifdef AFS_AIX32_ENV
+#ifdef KERNEL_HAVE_PIN
unpin((char *)setp->eventFlags, ICL_DEFAULTEVENTS);
#endif
for(i=0; i < ICL_LOGSPERSET; i++) {
/* none free, making one is better than a panic */
afs_stats_cmperf.dcacheXAllocs++; /* count in case we have a leak */
tdc = (struct dcache *) afs_osi_Alloc(sizeof (struct dcache));
-#ifdef AFS_AIX32_ENV
+#ifdef KERNEL_HAVE_PIN
pin((char *)tdc, sizeof(struct dcache)); /* XXX */
#endif
} else {
/* none free, making one is better than a panic */
afs_stats_cmperf.dcacheXAllocs++; /* count in case we have a leak */
tdc = (struct dcache *) afs_osi_Alloc(sizeof (struct dcache));
-#ifdef AFS_AIX32_ENV
+#ifdef KERNEL_HAVE_PIN
pin((char *)tdc, sizeof(struct dcache)); /* XXX */
#endif
} else {
tdp = afs_Initial_freeDSList =
(struct dcache *) afs_osi_Alloc(aDentries * sizeof(struct dcache));
memset((char *)tdp, 0, aDentries * sizeof(struct dcache));
-#ifdef AFS_AIX32_ENV
+#ifdef KERNEL_HAVE_PIN
pin((char *)afs_indexTable, sizeof(struct dcache *) * afiles);/* XXX */
pin((char *)afs_indexTimes, sizeof(afs_hyper_t) * afiles); /* XXX */
pin((char *)afs_indexFlags, sizeof(char) * afiles); /* XXX */
afs_osi_Free(afs_indexUnique, afs_cacheFiles * sizeof(afs_uint32));
afs_osi_Free(afs_indexFlags, afs_cacheFiles * sizeof(u_char));
afs_osi_Free(afs_Initial_freeDSList, afs_dcentries * sizeof(struct dcache));
-#ifdef AFS_AIX32_ENV
+#ifdef KERNEL_HAVE_PIN
unpin((char *)afs_dcnextTbl, afs_cacheFiles * sizeof(afs_int32));
unpin((char *)afs_dvnextTbl, afs_cacheFiles * sizeof(afs_int32));
unpin((char *)afs_indexTable, afs_cacheFiles * sizeof(struct dcache *));
char *p;
p = (char *) afs_osi_Alloc(AFS_SMALLOCSIZ * preallocs);
-#ifdef AFS_AIX32_ENV
+#ifdef KERNEL_HAVE_PIN
pin(p, AFS_SMALLOCSIZ * preallocs); /* XXXX */
#endif
for (i=0; i < preallocs; i++, p += AFS_SMALLOCSIZ) {
char *p;
p = (char *) afs_osi_Alloc(AFS_MDALLOCSIZ * preallocs);
-#ifdef AFS_AIX32_ENV
+#ifdef KERNEL_HAVE_PIN
pin(p, AFS_MDALLOCSIZ * preallocs); /* XXXX */
#endif
for (i=0; i < preallocs; i++, p += AFS_MDALLOCSIZ) {
afs_stats_cmperf.LargeBlocksAlloced++;
p = (char *) afs_osi_Alloc(AFS_LRALLOCSIZ);
-#ifdef AFS_AIX32_ENV
+#ifdef KERNEL_HAVE_PIN
/*
* Need to pin this memory since under heavy conditions this memory
* could be swapped out; the problem is that we could inside rx where
while ((tp = freePacketList)) {
freePacketList = tp->next;
afs_osi_Free(tp, AFS_LRALLOCSIZ);
-#ifdef AFS_AIX32_ENV
+#ifdef KERNEL_HAVE_PIN
unpin(tp, AFS_LRALLOCSIZ);
#endif
}
while ((tp = freeSmallList)) {
freeSmallList = tp->next;
afs_osi_Free(tp, AFS_SMALLOCSIZ);
-#ifdef AFS_AIX32_ENV
+#ifdef KERNEL_HAVE_PIN
unpin(tp, AFS_SMALLOCSIZ);
#endif
}
/* none free, making one is better than a panic */
afs_stats_cmperf.vcacheXAllocs++; /* count in case we have a leak */
tvc = (struct vcache *) afs_osi_Alloc(sizeof (struct vcache));
-#ifdef AFS_AIX32_ENV
+#ifdef KERNEL_HAVE_PIN
pin((char *)tvc, sizeof(struct vcache)); /* XXX */
#endif
#ifdef AFS_MACH_ENV
tvp[i].nextfree = &(tvp[i+1]);
}
tvp[astatSize-1].nextfree = NULL;
-#ifdef AFS_AIX32_ENV
+#ifdef KERNEL_HAVE_PIN
pin((char *)tvp, astatSize * sizeof(struct vcache)); /* XXX */
#endif
#endif
#if !defined(AFS_OSF_ENV)
afs_osi_Free(Initial_freeVCList, afs_cacheStats * sizeof(struct vcache));
#endif
-#ifdef AFS_AIX32_ENV
+#ifdef KERNEL_HAVE_PIN
unpin(Initial_freeVCList, afs_cacheStats * sizeof(struct vcache));
#endif
#endif
#define KERNEL_HAVE_SETUERROR 1
+#define KERNEL_HAVE_PIN 1
/* Extra kernel definitions (from kdefs file) */
#ifdef _KERNEL