This invention is directed to a system and method for using a template
that allows a user to define a specific message format for use in a
shared memory queue in the inter-process communication environment. A
shared segment of the size needed to hold the supplied number of elements
and a queue header are created. The system then unmaps the queue from the
user's address space. The queue contents are reset to initialize the
state. The supplied element in the queue is Pushed. The element for the
queue First-In/First-Out (FIFO) is Popped. An element from the queue may
be returned, without affecting queue status. The element content in the
queue is then updated. The queue is subsequently locked for exclusive
access. The lock may be released, enabling changes to the queue. The
system also provides the element count in the queue and the logical name
of the inter-process communication queue. The shared memory based header
maintained by each inter-process communication queue allows all the
clients of the queue to access queue information from a single source.