Make a bunch of malloc types static.
Found by: src/tools/tools/kernxref
This commit is contained in:
parent
d67c43b3a9
commit
c711aea6ca
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=141616
@ -42,7 +42,7 @@ static struct sx led_sx;
|
||||
static LIST_HEAD(, ledsc) led_list = LIST_HEAD_INITIALIZER(&led_list);
|
||||
static struct callout led_ch;
|
||||
|
||||
MALLOC_DEFINE(M_LED, "LED", "LED driver");
|
||||
static MALLOC_DEFINE(M_LED, "LED", "LED driver");
|
||||
|
||||
static void
|
||||
led_timeout(void *p)
|
||||
|
@ -275,6 +275,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/ray/if_raydbg.h>
|
||||
#include <dev/ray/if_rayvar.h>
|
||||
|
||||
static MALLOC_DEFINE(M_RAYCOM, "raycom", "Raylink command queue entry");
|
||||
/*
|
||||
* Prototyping
|
||||
*/
|
||||
|
@ -111,8 +111,6 @@ struct ray_softc {
|
||||
* Command queue definitions
|
||||
*/
|
||||
typedef void (*ray_comqfn_t)(struct ray_softc *sc, struct ray_comq_entry *com);
|
||||
MALLOC_DECLARE(M_RAYCOM);
|
||||
MALLOC_DEFINE(M_RAYCOM, "raycom", "Raylink command queue entry");
|
||||
struct ray_comq_entry {
|
||||
TAILQ_ENTRY(ray_comq_entry) c_chain; /* Tail queue. */
|
||||
ray_comqfn_t c_function; /* Function to call */
|
||||
|
@ -42,7 +42,7 @@
|
||||
|
||||
#include <fs/hpfs/hpfs.h>
|
||||
|
||||
MALLOC_DEFINE(M_HPFSHASH, "HPFS hash", "HPFS node hash tables");
|
||||
static MALLOC_DEFINE(M_HPFSHASH, "HPFS hash", "HPFS node hash tables");
|
||||
|
||||
/*
|
||||
* Structures associated with hpfsnode cacheing.
|
||||
|
@ -99,7 +99,7 @@
|
||||
#include <fs/udf/udf.h>
|
||||
#include <fs/udf/udf_mount.h>
|
||||
|
||||
MALLOC_DEFINE(M_UDFMOUNT, "UDF mount", "UDF mount structure");
|
||||
static MALLOC_DEFINE(M_UDFMOUNT, "UDF mount", "UDF mount structure");
|
||||
MALLOC_DEFINE(M_UDFFENTRY, "UDF fentry", "UDF file entry structure");
|
||||
|
||||
struct iconv_functions *udf_iconv = NULL;
|
||||
|
@ -65,7 +65,7 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#define TODO printf("%s: not implemented!\n", __func__)
|
||||
|
||||
MALLOC_DEFINE(M_IOAPIC, "I/O APIC", "I/O APIC structures");
|
||||
static MALLOC_DEFINE(M_IOAPIC, "I/O APIC", "I/O APIC structures");
|
||||
|
||||
/*
|
||||
* New interrupt support code..
|
||||
|
@ -147,7 +147,7 @@ static bus_datum *busses;
|
||||
static int mptable_nioapics, mptable_nbusses, mptable_maxbusid;
|
||||
static int pci0 = -1;
|
||||
|
||||
MALLOC_DEFINE(M_MPTABLE, "MP Table", "MP Table Items");
|
||||
static MALLOC_DEFINE(M_MPTABLE, "MP Table", "MP Table Items");
|
||||
|
||||
static enum intr_polarity conforming_polarity(u_char src_bus,
|
||||
u_char src_bus_irq);
|
||||
|
@ -99,7 +99,7 @@ static uint8_t pci_pir_search_irq(int bus, int device, int pin);
|
||||
static int pci_pir_valid_irq(struct pci_link *pci_link, int irq);
|
||||
static void pci_pir_walk_table(pir_entry_handler *handler, void *arg);
|
||||
|
||||
MALLOC_DEFINE(M_PIR, "$PIR", "$PIR structures");
|
||||
static MALLOC_DEFINE(M_PIR, "$PIR", "$PIR structures");
|
||||
|
||||
static struct PIR_table *pci_route_table;
|
||||
static device_t pir_device;
|
||||
|
@ -55,7 +55,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/libkern.h>
|
||||
#include <sys/kenv.h>
|
||||
|
||||
MALLOC_DEFINE(M_KENV, "kenv", "kernel environment");
|
||||
static MALLOC_DEFINE(M_KENV, "kenv", "kernel environment");
|
||||
|
||||
#define KENV_SIZE 512 /* Maximum number of environment strings */
|
||||
|
||||
|
@ -59,7 +59,8 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <vm/uma.h>
|
||||
|
||||
MALLOC_DEFINE(M_KQUEUE, "kqueue", "memory for kqueue system");
|
||||
static MALLOC_DEFINE(M_KQUEUE, "kqueue", "memory for kqueue system");
|
||||
|
||||
/*
|
||||
* This lock is used if multiple kq locks are required. This possibly
|
||||
* should be made into a per proc lock.
|
||||
|
@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/systm.h>
|
||||
|
||||
|
||||
MALLOC_DEFINE(M_MTXPOOL, "mtx_pool", "mutex pool");
|
||||
static MALLOC_DEFINE(M_MTXPOOL, "mtx_pool", "mutex pool");
|
||||
|
||||
/* Pool sizes must be a power of two */
|
||||
#ifndef MTX_POOL_LOCKBUILDER_SIZE
|
||||
|
@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/sbuf.h>
|
||||
|
||||
#ifdef _KERNEL
|
||||
MALLOC_DEFINE(M_SBUF, "sbuf", "string buffers");
|
||||
static MALLOC_DEFINE(M_SBUF, "sbuf", "string buffers");
|
||||
#define SBMALLOC(size) malloc(size, M_SBUF, M_WAITOK)
|
||||
#define SBFREE(buf) free(buf, M_SBUF)
|
||||
#else /* _KERNEL */
|
||||
|
@ -138,7 +138,7 @@ SYSCTL_UINT(_debug_sleepq, OID_AUTO, max_depth, CTLFLAG_RD, &sleepq_max_depth,
|
||||
#endif
|
||||
static struct sleepqueue_chain sleepq_chains[SC_TABLESIZE];
|
||||
|
||||
MALLOC_DEFINE(M_SLEEPQUEUE, "sleep queues", "sleep queues");
|
||||
static MALLOC_DEFINE(M_SLEEPQUEUE, "sleep queues", "sleep queues");
|
||||
|
||||
/*
|
||||
* Prototypes for non-exported routines.
|
||||
|
@ -136,7 +136,7 @@ SYSCTL_UINT(_debug_turnstile, OID_AUTO, max_depth, CTLFLAG_RD,
|
||||
static struct mtx td_contested_lock;
|
||||
static struct turnstile_chain turnstile_chains[TC_TABLESIZE];
|
||||
|
||||
MALLOC_DEFINE(M_TURNSTILE, "turnstiles", "turnstiles");
|
||||
static MALLOC_DEFINE(M_TURNSTILE, "turnstiles", "turnstiles");
|
||||
|
||||
/*
|
||||
* Prototypes for non-exported routines.
|
||||
|
@ -88,7 +88,7 @@ SYSCTL_INT(_kern_ipc, OID_AUTO, m_defragrandomfailures, CTLFLAG_RW,
|
||||
/*
|
||||
* Malloc-type for external ext_buf ref counts.
|
||||
*/
|
||||
MALLOC_DEFINE(M_MBUF, "mbextcnt", "mbuf external ref counts");
|
||||
static MALLOC_DEFINE(M_MBUF, "mbextcnt", "mbuf external ref counts");
|
||||
|
||||
/*
|
||||
* Allocate a given length worth of mbufs and/or clusters (whatever fits
|
||||
|
@ -76,7 +76,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/mbuf.h>
|
||||
#include <sys/mutex.h>
|
||||
|
||||
MALLOC_DEFINE(M_PACKET_TAGS, "mbuf tags", "packet-attached information");
|
||||
static MALLOC_DEFINE(M_PACKET_TAGS, "mbuf tags", "packet-attached information");
|
||||
|
||||
/* can't call it m_dup(), as freebsd[34] uses m_dup() with different arg */
|
||||
static struct mbuf *m_dup1(struct mbuf *, int, int, int);
|
||||
|
@ -100,7 +100,7 @@ LIST_HEAD(, if_clone) if_cloners = LIST_HEAD_INITIALIZER(if_cloners);
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
MALLOC_DEFINE(M_CLONE, "clone", "interface cloning framework");
|
||||
static MALLOC_DEFINE(M_CLONE, "clone", "interface cloning framework");
|
||||
|
||||
void
|
||||
if_clone_init(void)
|
||||
|
Loading…
Reference in New Issue
Block a user