OAR

RTEMS 4.5.1-pre3 On-Line Library


Semaphore Manager T_CSEM Structure

PREV UP NEXT Bookshelf RTEMS ITRON 3.0 API User's Guide

3.2.2: T_CSEM Structure

The T_CSEM structure is used to define the characteristics of a semaphore and passed an as argument to the cre_sem service. The structure is defined as follows:

/*
 *  Create Semaphore (cre_sem) Structure
 */

typedef struct t_csem {
  VP    exinf;    /* extended information */
  ATR   sematr;   /* semaphore attributes */
  /* Following is the extended function for [level X]. */
  INT   isemcnt;   /* initial semaphore count */
  INT   maxsem;    /* maximum semaphore count */
  /* additional implementation dependent information may be included */
} T_CSEM;

/*
 *  sematr - Semaphore Attribute Values
 */

#define TA_TFIFO   0x00   /* waiting tasks are handled by FIFO */
#define TA_TPRI    0x01   /* waiting tasks are handled by priority */

where the meaning of each field is:

exinf
is for any extended information that the implementation may define. This implementation does not use this field.
sematr
is the attributes for this semaphore. The only attributed which can be specified is whether tasks wait in FIFO (TA_TFIFO) or priority (TA_TPRI) order.
isemcnt
is the initial count of the semaphore.
maxsem
is the maximum count the semaphore may have. It places an upper limit on the value taken by the semaphore.


PREV UP NEXT Bookshelf RTEMS ITRON 3.0 API User's Guide

Copyright © 1988-2000 OAR Corporation