From 8e4008ae19302cdaa50248489ee25467b043df22 Mon Sep 17 00:00:00 2001 From: Cary R Date: Wed, 20 Apr 2011 09:11:01 -0700 Subject: [PATCH] $q_full should return x for an invalid id. After some more thought I believe it is better for $q_full to return 'bx instead of 2 when $q_full is given an invalid id. This will make the typical full/not full checks both return false. We still return an error code in the status variable. (cherry picked from commit 10b2310c52b2b9cbb71dbc0c48d2c495cae43f17) --- vpi/sys_queue.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/vpi/sys_queue.c b/vpi/sys_queue.c index 3a9d849a2..27a55ddc0 100644 --- a/vpi/sys_queue.c +++ b/vpi/sys_queue.c @@ -1193,9 +1193,7 @@ static PLI_INT32 sys_q_full_calltf(PLI_BYTE8 *name) val.format = vpiIntVal; val.value.integer = IVL_QUEUE_UNDEFINED_ID; vpi_put_value(status, &val, 0, vpiNoDelay); - val.format = vpiIntVal; - val.value.integer = 2; /* An error value. */ - vpi_put_value(callh, &val, 0, vpiNoDelay); + fill_variable_with_x(callh); return 0; }