extern void *osi_fbsd_alloc(size_t size, int dropglobal);
extern void osi_fbsd_free(void *p);
-#undef afs_osi_Alloc_NoSleep
#define afs_osi_Alloc_NoSleep(size) osi_fbsd_alloc((size), 0)
#ifdef AFS_FBSD80_ENV
#define osi_vnhold(avc, r) do { VN_HOLD(AFSTOV(avc)); } while(0)
-#undef afs_osi_Alloc_NoSleep
-extern void *afs_osi_Alloc_NoSleep(size_t size);
-
-
#ifdef AFS_SGI64_ENV
#include <sys/flock.h>
extern flid_t osi_flid;
#define osi_Time() (hrestime.tv_sec)
#endif
-#undef afs_osi_Alloc_NoSleep
-extern void *afs_osi_Alloc_NoSleep(size_t size);
-
#ifdef AFS_SUN58_ENV
# define osi_vnhold(avc, r) do { \
struct vnode *vp = AFSTOV(avc); \
#define osi_NPACKETS 20 /* number of cluster pkts to alloc */
-/*
- * Alloc declarations.
- */
-#if !defined(AFS_OBSD44_ENV) && !defined(AFS_NBSD_ENV)
-#define afs_osi_Alloc_NoSleep afs_osi_Alloc
-#endif
/*
* Default vnode related macros
#endif
}
-#if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
-
-void *
-afs_osi_Alloc_NoSleep(size_t x)
-{
- struct osimem *tm;
- int size;
-
- AFS_STATCNT(osi_Alloc);
- /* 0-length allocs may return NULL ptr from AFS_KALLOC, so we special-case
- * things so that NULL returned iff an error occurred */
- if (x == 0)
- return &memZero;
-
- size = x;
- AFS_STATS(afs_stats_cmperf.OutStandingAllocs++);
- AFS_STATS(afs_stats_cmperf.OutStandingMemUsage += x);
- tm = (struct osimem *)AFS_KALLOC_NOSLEEP(size);
- return (void *)tm;
-}
-
-#endif /* SUN || SGI */
-
void
afs_osi_Free(void *x, size_t asize)
{
#endif
extern void *afs_osi_Alloc_debug(size_t x, char *func, int line);
-#ifndef afs_osi_Alloc_NoSleep
-extern void *afs_osi_Alloc_NoSleep(size_t x);
-#endif
#ifndef afs_osi_Free
extern void afs_osi_Free(void *x, size_t asize);
#endif
#ifndef afs_osi_Alloc
extern void *afs_osi_Alloc(size_t x);
#endif
-#ifndef afs_osi_Alloc_NoSleep
-extern void *afs_osi_Alloc_NoSleep(size_t x);
-#endif
#ifndef afs_osi_Free
extern void afs_osi_Free(void *x, size_t asize);
#endif
/* keep here for now, 64 bit issues */
#ifndef AFS_OBSD44_ENV
extern void *afs_osi_Alloc(size_t x);
-#ifndef afs_osi_Alloc_NoSleep
-extern void *afs_osi_Alloc_NoSleep(size_t x);
-#endif
extern void afs_osi_Free(void *x, size_t asize);
#endif