Modify definition of Malloc: only M_WAITOK if we're not in an
interrupt context.
This commit is contained in:
parent
886293e5aa
commit
d00c77c723
@ -35,7 +35,10 @@
|
||||
*/
|
||||
|
||||
/* Header files used by all modules */
|
||||
/* $FreeBSD$ */
|
||||
/*
|
||||
* $Id: vinumhdr.h,v 1.15 1999/10/12 09:40:35 grog Exp grog $
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#ifdef KERNEL
|
||||
@ -72,6 +75,7 @@
|
||||
#include <dev/vinum/vinumio.h>
|
||||
#include <dev/vinum/vinumkw.h>
|
||||
#include <dev/vinum/vinumext.h>
|
||||
#include <machine/cpu.h>
|
||||
|
||||
#undef Free /* defined in some funny net stuff */
|
||||
#ifdef KERNEL
|
||||
@ -82,7 +86,7 @@ caddr_t MMalloc (int size, char *, int);
|
||||
void FFree (void *mem, char *, int);
|
||||
#define LOCKDRIVE(d) lockdrive (d, __FILE__, __LINE__)
|
||||
#else
|
||||
#define Malloc(x) malloc((x), M_DEVBUF, M_WAITOK)
|
||||
#define Malloc(x) malloc((x), M_DEVBUF, intr_nesting_level == 0)
|
||||
#define Free(x) free((x), M_DEVBUF)
|
||||
#define LOCKDRIVE(d) lockdrive (d)
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user