diff options
author | jkim <jkim@FreeBSD.org> | 2005-12-06 07:22:01 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2005-12-06 07:22:01 +0000 |
commit | 9fbde6681e0fc0266c9ba6d99e20c203f57baefb (patch) | |
tree | f4c82d79823bd07d83bdbe2a85443750e2072fd4 /sys | |
parent | 3bd9b70058745a5d299211ad4d016ee9e258a026 (diff) | |
download | FreeBSD-src-9fbde6681e0fc0266c9ba6d99e20c203f57baefb.zip FreeBSD-src-9fbde6681e0fc0266c9ba6d99e20c203f57baefb.tar.gz |
s/M_WAITOK/M_NOWAIT/ while mutex is held.
Pointed out by: csjp
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/amd64/bpf_jit_machdep.c | 4 | ||||
-rw-r--r-- | sys/i386/i386/bpf_jit_machdep.c | 4 | ||||
-rw-r--r-- | sys/net/bpf_jitter.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/sys/amd64/amd64/bpf_jit_machdep.c b/sys/amd64/amd64/bpf_jit_machdep.c index bc38abe..9c0c15b 100644 --- a/sys/amd64/amd64/bpf_jit_machdep.c +++ b/sys/amd64/amd64/bpf_jit_machdep.c @@ -105,7 +105,7 @@ bpf_jit_compile(struct bpf_insn *prog, u_int nins, int *mem) /* Allocate the reference table for the jumps */ stream.refs = (u_int *)malloc((nins + 1) * sizeof(u_int), - M_BPFJIT, M_WAITOK); + M_BPFJIT, M_NOWAIT); if (stream.refs == NULL) return NULL; @@ -459,7 +459,7 @@ bpf_jit_compile(struct bpf_insn *prog, u_int nins, int *mem) if (pass == 2) break; - stream.ibuf = (char *)malloc(stream.cur_ip, M_BPFJIT, M_WAITOK); + stream.ibuf = (char *)malloc(stream.cur_ip, M_BPFJIT, M_NOWAIT); if (stream.ibuf == NULL) { free(stream.refs, M_BPFJIT); return NULL; diff --git a/sys/i386/i386/bpf_jit_machdep.c b/sys/i386/i386/bpf_jit_machdep.c index ea101aa..1465ce5 100644 --- a/sys/i386/i386/bpf_jit_machdep.c +++ b/sys/i386/i386/bpf_jit_machdep.c @@ -105,7 +105,7 @@ bpf_jit_compile(struct bpf_insn *prog, u_int nins, int *mem) /* Allocate the reference table for the jumps */ stream.refs = (u_int *)malloc((nins + 1) * sizeof(u_int), - M_BPFJIT, M_WAITOK); + M_BPFJIT, M_NOWAIT); if (stream.refs == NULL) return NULL; @@ -479,7 +479,7 @@ bpf_jit_compile(struct bpf_insn *prog, u_int nins, int *mem) if (pass == 2) break; - stream.ibuf = (char *)malloc(stream.cur_ip, M_BPFJIT, M_WAITOK); + stream.ibuf = (char *)malloc(stream.cur_ip, M_BPFJIT, M_NOWAIT); if (stream.ibuf == NULL) { free(stream.refs, M_BPFJIT); return NULL; diff --git a/sys/net/bpf_jitter.c b/sys/net/bpf_jitter.c index 26a57fc..2d0ee2e1 100644 --- a/sys/net/bpf_jitter.c +++ b/sys/net/bpf_jitter.c @@ -53,13 +53,13 @@ bpf_jitter(struct bpf_insn *fp, int nins) /* Allocate the filter structure */ filter = (struct bpf_jit_filter *)malloc(sizeof(struct bpf_jit_filter), - M_BPFJIT, M_WAITOK); + M_BPFJIT, M_NOWAIT); if (filter == NULL) return NULL; /* Allocate the filter's memory */ filter->mem = (int *)malloc(BPF_MEMWORDS * sizeof(int), - M_BPFJIT, M_WAITOK); + M_BPFJIT, M_NOWAIT); if (filter->mem == NULL) { free(filter, M_BPFJIT); return NULL; |