From ebeac56867acdb168b711ae103d7e5869011c947 Mon Sep 17 00:00:00 2001 From: "Chas Williams (CONTRACTOR)" Date: Tue, 19 Oct 2010 12:19:16 -0400 Subject: [PATCH] afs: afs_osi_Alloc_NoSleep() cleanup afs_osi_Alloc_NoSleep() is no longer used by the SOLARIS or IRIX clients. It is used by the *BSD code in rx, so just let those platforms define/prototype it in their osi_machdep.h Change-Id: Ie2e4a6f7520329c345ac63c67d7b156ed21d109f Reviewed-on: http://gerrit.openafs.org/3010 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- src/afs/FBSD/osi_machdep.h | 1 - src/afs/IRIX/osi_machdep.h | 4 ---- src/afs/SOLARIS/osi_machdep.h | 3 --- src/afs/afs_osi.h | 6 ------ src/afs/afs_osi_alloc.c | 23 ----------------------- src/afs/afs_prototypes.h | 3 --- src/rx/rx_prototypes.h | 3 --- src/rx/xdr.h | 3 --- 8 files changed, 46 deletions(-) diff --git a/src/afs/FBSD/osi_machdep.h b/src/afs/FBSD/osi_machdep.h index 5bc4454..86f1bdb 100644 --- a/src/afs/FBSD/osi_machdep.h +++ b/src/afs/FBSD/osi_machdep.h @@ -79,7 +79,6 @@ extern int (**afs_vnodeop_p) (); 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 diff --git a/src/afs/IRIX/osi_machdep.h b/src/afs/IRIX/osi_machdep.h index 02b6e8a..0ee2937 100644 --- a/src/afs/IRIX/osi_machdep.h +++ b/src/afs/IRIX/osi_machdep.h @@ -38,10 +38,6 @@ typedef struct proc afs_proc_t; #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 extern flid_t osi_flid; diff --git a/src/afs/SOLARIS/osi_machdep.h b/src/afs/SOLARIS/osi_machdep.h index 3e8c886..3147445 100644 --- a/src/afs/SOLARIS/osi_machdep.h +++ b/src/afs/SOLARIS/osi_machdep.h @@ -54,9 +54,6 @@ local_osi_Time() #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); \ diff --git a/src/afs/afs_osi.h b/src/afs/afs_osi.h index 5d0bdc9..2bb57f5 100644 --- a/src/afs/afs_osi.h +++ b/src/afs/afs_osi.h @@ -124,12 +124,6 @@ struct afs_osi_WaitHandle { #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 diff --git a/src/afs/afs_osi_alloc.c b/src/afs/afs_osi_alloc.c index fa750c4..4d7b229 100644 --- a/src/afs/afs_osi_alloc.c +++ b/src/afs/afs_osi_alloc.c @@ -76,29 +76,6 @@ afs_osi_Alloc(size_t x) #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) { diff --git a/src/afs/afs_prototypes.h b/src/afs/afs_prototypes.h index c99beaa..93a2d12 100644 --- a/src/afs/afs_prototypes.h +++ b/src/afs/afs_prototypes.h @@ -556,9 +556,6 @@ extern afs_lock_t osi_flplock; #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 diff --git a/src/rx/rx_prototypes.h b/src/rx/rx_prototypes.h index 91fc74d..8d9e736 100644 --- a/src/rx/rx_prototypes.h +++ b/src/rx/rx_prototypes.h @@ -657,9 +657,6 @@ extern void rx_SetMaxMTU(int mtu); #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 diff --git a/src/rx/xdr.h b/src/rx/xdr.h index d23e610..82dbe52 100644 --- a/src/rx/xdr.h +++ b/src/rx/xdr.h @@ -108,9 +108,6 @@ typedef char * caddr_t; /* 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 -- 1.9.4