summaryrefslogtreecommitdiffstats
path: root/sys/dev/vinum
diff options
context:
space:
mode:
authorjake <jake@FreeBSD.org>2001-01-10 04:43:51 +0000
committerjake <jake@FreeBSD.org>2001-01-10 04:43:51 +0000
commit4f5d8ed82579a945555b585b43ab2d09eae30c77 (patch)
tree512839f19fc02786cc9904c4406357f3573a8b09 /sys/dev/vinum
parent776ef1f43089579877329277af83423976a699d2 (diff)
downloadFreeBSD-src-4f5d8ed82579a945555b585b43ab2d09eae30c77.zip
FreeBSD-src-4f5d8ed82579a945555b585b43ab2d09eae30c77.tar.gz
Use PCPU_GET, PCPU_PTR and PCPU_SET to access all per-cpu variables
other then curproc.
Diffstat (limited to 'sys/dev/vinum')
-rw-r--r--sys/dev/vinum/vinumhdr.h2
-rw-r--r--sys/dev/vinum/vinummemory.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/vinum/vinumhdr.h b/sys/dev/vinum/vinumhdr.h
index be30beb..8d53f0f 100644
--- a/sys/dev/vinum/vinumhdr.h
+++ b/sys/dev/vinum/vinumhdr.h
@@ -86,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, intr_nesting_level == 0)
+#define Malloc(x) malloc((x), M_DEVBUF, PCPU_GET(intr_nesting_level) == 0)
#define Free(x) free((x), M_DEVBUF)
#define LOCKDRIVE(d) lockdrive (d)
#endif
diff --git a/sys/dev/vinum/vinummemory.c b/sys/dev/vinum/vinummemory.c
index 8e501a2..e28f7ae 100644
--- a/sys/dev/vinum/vinummemory.c
+++ b/sys/dev/vinum/vinummemory.c
@@ -151,7 +151,7 @@ MMalloc(int size, char *file, int line)
return 0; /* can't continue */
}
/* Wait for malloc if we can */
- result = malloc(size, M_DEVBUF, intr_nesting_level == 0 ? M_WAITOK : M_NOWAIT);
+ result = malloc(size, M_DEVBUF, PCPU_GET(intr_nesting_level) == 0 ? M_WAITOK : M_NOWAIT);
if (result == NULL)
log(LOG_ERR, "vinum: can't allocate %d bytes from %s:%d\n", size, file, line);
else {
OpenPOWER on IntegriCloud