Don't attempt to inline large functions mb_alloc() and mb_free(),
it more than doubles the text size of this file. GCC has wisely ignored us on this previously
This commit is contained in:
parent
60512ca0d2
commit
55d1d7034f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=117878
@ -211,6 +211,11 @@ mi_startup(void)
|
||||
if ((*sipp)->subsystem == SI_SUB_DONE)
|
||||
continue;
|
||||
|
||||
if (0 && bootverbose)
|
||||
printf("Sysinit %p(%p) subsys %x order %x\n",
|
||||
(*sipp)->func, (*sipp)->udata,
|
||||
(*sipp)->subsystem, (*sipp)->order);
|
||||
|
||||
/* Call function */
|
||||
(*((*sipp)->func))((*sipp)->udata);
|
||||
|
||||
|
@ -272,14 +272,16 @@ malloc(size, type, flags)
|
||||
* This routine may not block.
|
||||
*/
|
||||
void
|
||||
free(addr, type)
|
||||
void *addr;
|
||||
free(arg, type)
|
||||
void const *arg;
|
||||
struct malloc_type *type;
|
||||
{
|
||||
register struct malloc_type *ksp = type;
|
||||
uma_slab_t slab;
|
||||
u_long size;
|
||||
void *addr;
|
||||
|
||||
addr = __DECONST(void *, arg);
|
||||
/* free(NULL, ...) does nothing */
|
||||
if (addr == NULL)
|
||||
return;
|
||||
@ -387,7 +389,8 @@ reallocf(addr, size, type, flags)
|
||||
{
|
||||
void *mem;
|
||||
|
||||
if ((mem = realloc(addr, size, type, flags)) == NULL)
|
||||
mem = realloc(addr, size, type, flags);
|
||||
if (mem == NULL)
|
||||
free(addr, type);
|
||||
return (mem);
|
||||
}
|
||||
|
@ -178,6 +178,7 @@ MD5Update (context, input, inputLen)
|
||||
i = 0;
|
||||
|
||||
/* Buffer remaining input */
|
||||
/*lint -e{669} */
|
||||
memcpy ((void *)&context->buffer[index], (const void *)&input[i],
|
||||
inputLen-i);
|
||||
}
|
||||
|
@ -73,6 +73,9 @@ run_interrupt_driven_config_hooks(dummy)
|
||||
hook_entry != NULL;
|
||||
hook_entry = next_entry) {
|
||||
next_entry = TAILQ_NEXT(hook_entry, ich_links);
|
||||
printf("IDCH: %p(%p)\n",
|
||||
hook_entry->ich_func,
|
||||
hook_entry->ich_arg);
|
||||
(*hook_entry->ich_func)(hook_entry->ich_arg);
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$");
|
||||
static void clist_init(void *);
|
||||
SYSINIT(clist, SI_SUB_CLIST, SI_ORDER_FIRST, clist_init, NULL)
|
||||
|
||||
static struct cblock *cfreelist = 0;
|
||||
static struct cblock *cfreelist = 0; /* XXX: use <sys/queue.h> */
|
||||
int cfreecount = 0;
|
||||
static int cslushcount;
|
||||
static int ctotcount;
|
||||
|
@ -607,7 +607,7 @@ mb_pop_cont(struct mb_lstmngr *mb_list, int how, struct mb_pcpu_list *cnt_lst)
|
||||
* the general container is empty, and we've run out of address space
|
||||
* in our map; then we try to block if we're willing to (M_TRYWAIT).
|
||||
*/
|
||||
static __inline
|
||||
static
|
||||
void *
|
||||
mb_alloc(struct mb_lstmngr *mb_list, int how, short type, short persist,
|
||||
int *pers_list)
|
||||
@ -854,7 +854,7 @@ mb_alloc_wait(struct mb_lstmngr *mb_list, short type)
|
||||
* waiting for the lock; our bucket is in the general container;
|
||||
* our bucket is empty.
|
||||
*/
|
||||
static __inline
|
||||
static
|
||||
void
|
||||
mb_free(struct mb_lstmngr *mb_list, void *m, short type, short persist,
|
||||
int *pers_list)
|
||||
|
@ -237,6 +237,25 @@ log(int level, const char *fmt, ...)
|
||||
msgbuftrigger = 1;
|
||||
}
|
||||
|
||||
int
|
||||
vlog(const char *fmt, va_list ap)
|
||||
{
|
||||
int savintr;
|
||||
struct putchar_arg pca;
|
||||
int retval;
|
||||
|
||||
savintr = consintr; /* disable interrupts */
|
||||
consintr = 0;
|
||||
pca.tty = NULL;
|
||||
pca.flags = log_open ? TOLOG : TOCONS;
|
||||
pca.pri = -1;
|
||||
retval = kvprintf(fmt, putchar, &pca, 10, ap);
|
||||
if (!panicstr)
|
||||
msgbuftrigger = 1;
|
||||
consintr = savintr; /* reenable interrupts */
|
||||
return (retval);
|
||||
}
|
||||
|
||||
#define CONSCHUNK 128
|
||||
|
||||
void
|
||||
@ -323,6 +342,7 @@ vprintf(const char *fmt, va_list ap)
|
||||
return (retval);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Print a character on console or users terminal. If destination is
|
||||
* the console then the last bunch of characters are saved in msgbuf for
|
||||
|
@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$");
|
||||
static void clist_init(void *);
|
||||
SYSINIT(clist, SI_SUB_CLIST, SI_ORDER_FIRST, clist_init, NULL)
|
||||
|
||||
static struct cblock *cfreelist = 0;
|
||||
static struct cblock *cfreelist = 0; /* XXX: use <sys/queue.h> */
|
||||
int cfreecount = 0;
|
||||
static int cslushcount;
|
||||
static int ctotcount;
|
||||
|
@ -239,7 +239,7 @@ cluster_read(vp, filesize, lblkno, size, cred, totread, seqcount, bpp)
|
||||
bp->b_ioflags &= ~BIO_ERROR;
|
||||
if ((bp->b_flags & B_ASYNC) || bp->b_iodone != NULL)
|
||||
BUF_KERNPROC(bp);
|
||||
error = VOP_STRATEGY(vp, bp);
|
||||
error = BUF_STRATEGY(bp);
|
||||
curproc->p_stats->p_ru.ru_inblock++;
|
||||
if (error)
|
||||
return (error);
|
||||
@ -293,7 +293,7 @@ cluster_read(vp, filesize, lblkno, size, cred, totread, seqcount, bpp)
|
||||
rbp->b_ioflags &= ~BIO_ERROR;
|
||||
if ((rbp->b_flags & B_ASYNC) || rbp->b_iodone != NULL)
|
||||
BUF_KERNPROC(rbp);
|
||||
(void) VOP_STRATEGY(vp, rbp);
|
||||
BUF_STRATEGY(rbp);
|
||||
curproc->p_stats->p_ru.ru_inblock++;
|
||||
}
|
||||
|
||||
|
@ -3679,14 +3679,13 @@ NDFREE(ndp, flags)
|
||||
* request (obsoleted). Returns 0 on success, or an errno on failure.
|
||||
*/
|
||||
int
|
||||
vaccess(type, file_mode, file_uid, file_gid, acc_mode, cred, privused)
|
||||
enum vtype type;
|
||||
mode_t file_mode;
|
||||
uid_t file_uid;
|
||||
gid_t file_gid;
|
||||
mode_t acc_mode;
|
||||
struct ucred *cred;
|
||||
int *privused;
|
||||
vaccess(enum vtype type,
|
||||
mode_t file_mode,
|
||||
uid_t file_uid,
|
||||
gid_t file_gid,
|
||||
mode_t acc_mode,
|
||||
struct ucred *cred,
|
||||
int *privused)
|
||||
{
|
||||
mode_t dac_granted;
|
||||
#ifdef CAPABILITIES
|
||||
|
Loading…
Reference in New Issue
Block a user