$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.
This commit is contained in:
Cary R 2011-04-20 09:11:01 -07:00 committed by Stephen Williams
parent 54ed0832db
commit 10b2310c52
1 changed files with 1 additions and 3 deletions

View File

@ -1194,9 +1194,7 @@ static PLI_INT32 sys_q_full_calltf(ICARUS_VPI_CONST 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;
}