[sv-ec] When does the mailbox put task block

From: Chris Spear <Chris.Spear_at_.....>
Date: Wed Nov 09 2005 - 03:30:17 PST
When does a mailbox put() block?  According to the LRM:

	"If the mailbox was created with a bounded queue the process 
	shall be suspended until there is enough room in the queue."

These seems ambigious to me.  Does the message get placed into the queue then the process is blocked?  

If I create a mailbox with a size of 1, does the first put() block, or the second?  

Can a mailbox be configured so that the source produces one message, does a put() which blocks immediately until the drain removes it with a get()?  This does not seem likely.

Here is my interpretation:

If the mailbox was created with a bounded queue, put() will check if the queue is full.  If the queue is not full, put() shall place the message in the queue and return immediately.  If the queue is full, the put shall block until the queue becomes non-full, at which point it shall place the message into the queue and return."

/*********************************************************   
Chris Spear              Verification Specialist             
Synopsys, Inc.           Phone 508-263-8114      ..  __@     
377 Simarano Drive       Fax   508-263-8123        _`\<,_    
Marlboro, MA 01752 USA   Cell  508-254-7223    .. (*)/ (*)   
Spear_ f rom _Synopsys.com       http://Chris.Spear.net              
*********************************************************/  
Received on Wed Nov 9 03:30:21 2005

This archive was generated by hypermail 2.1.8 : Wed Nov 09 2005 - 03:30:47 PST