Don't declare functions as extern.

Move all extern variable definitions to associated .h files, move some
extern variable definitions between include files to place them more
appropriately.

MFC after:	3 days
This commit is contained in:
rwatson 2008-01-19 14:32:44 +00:00
parent af893b7bf8
commit 735d73fd1d
4 changed files with 20 additions and 25 deletions

View File

@ -73,16 +73,10 @@ do { \
#define CODA_FREE(ptr, size) free((ptr), M_CODA)
/*
* global cache state control
*/
extern int coda_nc_use;
/*
* Used to select debugging statements throughout the cfs code.
*/
extern int codadebug;
extern int coda_nc_debug;
extern int coda_printf_delay;
extern int coda_vnop_print_entry;
extern int coda_psdev_print_entry;

View File

@ -136,21 +136,28 @@ struct coda_hash { /* Start of Hash chain */
#define CODA_NC_DEBUG(N, STMT) { if (coda_nc_debug & (1 <<N)) { STMT } }
/* Prototypes of functions exported within cfs */
extern void coda_nc_init(void);
extern void coda_nc_enter(struct cnode *, const char *, int, struct ucred *, struct cnode *);
extern struct cnode *coda_nc_lookup(struct cnode *, const char *, int, struct ucred *);
void coda_nc_init(void);
void coda_nc_enter(struct cnode *, const char *, int, struct ucred *, struct cnode *);
struct cnode *coda_nc_lookup(struct cnode *, const char *, int, struct ucred *);
extern void coda_nc_zapParentfid(CodaFid *, enum dc_status);
extern void coda_nc_zapfid(CodaFid *, enum dc_status);
extern void coda_nc_zapvnode(CodaFid *, struct ucred *, enum dc_status);
extern void coda_nc_zapfile(struct cnode *, const char *, int);
extern void coda_nc_purge_user(uid_t, enum dc_status);
extern void coda_nc_flush(enum dc_status);
void coda_nc_zapParentfid(CodaFid *, enum dc_status);
void coda_nc_zapfid(CodaFid *, enum dc_status);
void coda_nc_zapvnode(CodaFid *, struct ucred *, enum dc_status);
void coda_nc_zapfile(struct cnode *, const char *, int);
void coda_nc_purge_user(uid_t, enum dc_status);
void coda_nc_flush(enum dc_status);
extern void print_coda_nc(void);
extern void coda_nc_gather_stats(void);
extern int coda_nc_resize(int, int, enum dc_status);
extern void coda_nc_name(struct cnode *cp);
void print_coda_nc(void);
void coda_nc_gather_stats(void);
int coda_nc_resize(int, int, enum dc_status);
void coda_nc_name(struct cnode *cp);
/*
* Global variables tracking and controlling Coda namecache operation.
*/
extern int coda_nc_debug; /* Set to enable debugging printfs */
extern int coda_nc_initialized; /* Set if cache has been initialized */
extern int coda_nc_use; /* Indicate use of CODA Name Cache */
/*
* Structure to contain statistics on the cache usage

View File

@ -51,9 +51,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
extern int coda_nc_initialized; /* Set if cache has been initialized */
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/ioccom.h>

View File

@ -77,9 +77,6 @@ struct coda_op_stats coda_vfsopstats[CODA_VFSOPS_SIZE];
#define MARK_INT_FAIL(op) (coda_vfsopstats[op].unsat_intrn++)
#define MARK_INT_GEN(op) (coda_vfsopstats[op].gen_intrn++)
extern int coda_nc_initialized; /* Set if cache has been initialized */
extern int vc_nb_open(struct cdev *, int, int, struct thread *);
int
coda_vfsopstats_init(void)
{