| iMatix home page
| << | < | > | >>
SMT Logo SMT
Version 2.81

 

queue_lookup

#include "smtlib.h"
QUEUE *
queue_lookup (
    const QID *qid                      /*  Queue to find                    */
)

Synopsis

Returns a pointer to the queue information block for the specified queue handle. You can change the max_events field, but you should not change the other fields in the queue information block. In case of error, returns NULL and sets smt_errno to one of these values:
SMT NOTREADY smt_init() was not called, or failed
SMT NOSUCHQUEUE The event queue is not defined

Source Code - (smtlib.c)

{
    SYMBOL  *dict_entry;                /*  Queue entry in dictionary        */

#if (defined (SMT_TRACE))
    trace ("queue_lookup");
#endif
    ASSERT (qid);
    if (!smt_alive)                     /*  If SMT API was not correctly     */
      {                                 /*    initialised, forget it         */
        smt_errno = SMT_NOTREADY;
        return (NULL);
      }

    dict_entry = sym_lookup_symbol (dict, get_queue_name (qid));
    if (dict_entry)
        return (dict_entry-> data);
    else
      {
        smt_errno = SMT_NOSUCHQUEUE;
        return (NULL);
      }
}

| << | < | > | >> iMatix Copyright © 1996-99 iMatix Corporation