summaryrefslogtreecommitdiffstats
path: root/sys/netatm/uni/unisig_vc_state.c
diff options
context:
space:
mode:
authorharti <harti@FreeBSD.org>2003-07-23 14:28:57 +0000
committerharti <harti@FreeBSD.org>2003-07-23 14:28:57 +0000
commitf8b34e3f70219ed6642f2c3ed7430361969ccccf (patch)
tree9fe86b328b35bc3515a752c557d6999aa602cfe7 /sys/netatm/uni/unisig_vc_state.c
parent162e49f535eeecc1626f095ecec2e27292d2dd24 (diff)
downloadFreeBSD-src-f8b34e3f70219ed6642f2c3ed7430361969ccccf.zip
FreeBSD-src-f8b34e3f70219ed6642f2c3ed7430361969ccccf.tar.gz
Convert a lot of uma_zalloc() calls to be NOWAIT instead of WAITOK. All
these may be called from contexts where we cannot sleep (callout handlers for example).
Diffstat (limited to 'sys/netatm/uni/unisig_vc_state.c')
-rw-r--r--sys/netatm/uni/unisig_vc_state.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/netatm/uni/unisig_vc_state.c b/sys/netatm/uni/unisig_vc_state.c
index 50eb474..81ff8fc 100644
--- a/sys/netatm/uni/unisig_vc_state.c
+++ b/sys/netatm/uni/unisig_vc_state.c
@@ -659,9 +659,10 @@ unisig_vc_act06(usp, uvp, msg)
} else {
/*
* No--VCI must have been specified earlier
+ * May be called from netisr - don't wait.
*/
if (!uvp->uv_vci) {
- iep = uma_zalloc(unisig_ie_zone, M_WAITOK);
+ iep = uma_zalloc(unisig_ie_zone, M_NOWAIT);
if (iep == NULL)
return(ENOMEM);
iep->ie_ident = UNI_IE_CNID;
@@ -734,8 +735,9 @@ unisig_vc_act06(usp, uvp, msg)
/*
* Get memory for a CONNECT ACK message
+ * May be called from netisr.
*/
- cack_msg = uma_zalloc(unisig_msg_zone, M_WAITOK);
+ cack_msg = uma_zalloc(unisig_msg_zone, M_NOWAIT);
if (cack_msg == NULL)
return(ENOMEM);
@@ -1051,7 +1053,8 @@ unisig_vc_act09(usp, uvp, msg)
int rc;
struct unisig_msg *conn_msg;
- conn_msg = uma_zalloc(unisig_msg_zone, M_WAITOK);
+ /* may be called from timeout - don't wait */
+ conn_msg = uma_zalloc(unisig_msg_zone, M_NOWAIT);
if (conn_msg == NULL)
return(ENOMEM);
@@ -1603,8 +1606,9 @@ unisig_vc_act20(usp, uvp, msg)
/*
* Get memory for a STATUS ENQUIRY message
+ * May be called from netisr - don't wait.
*/
- stat_msg = uma_zalloc(unisig_msg_zone, M_WAITOK);
+ stat_msg = uma_zalloc(unisig_msg_zone, M_NOWAIT);
if (stat_msg == NULL)
return(ENOMEM);
OpenPOWER on IntegriCloud