source: rtems/cpukit/itron/include/itronsys/semaphore.h @ de05cbb9

4.104.114.84.95
Last change on this file since de05cbb9 was 9d9a3dd, checked in by Jennifer Averett <Jennifer.Averett@…>, on 11/17/99 at 16:47:58

+ Updated copyright information.

  • Property mode set to 100644
File size: 2.0 KB
Line 
1/*
2 *  COPYRIGHT (c) 1989-1999.
3 *  On-Line Applications Research Corporation (OAR).
4 *
5 *  The license and distribution terms for this file may be
6 *  found in the file LICENSE in this distribution or at
7 *  http://www.OARcorp.com/rtems/license.html.
8 *
9 *  $Id$
10 */
11
12#ifndef __ITRON_SEMAPHORE_h_
13#define __ITRON_SEMAPHORE_h_
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19/*
20 *  Create Semaphore (cre_sem) Structure
21 */
22
23typedef struct t_csem {
24  VP    exinf;    /* extended information */
25  ATR   sematr;   /* semaphore attributes */
26  /* Following is the extended function for [level X]. */
27  INT   isemcnt;   /* initial semaphore count */
28  INT   maxsem;    /* maximum semaphore count */
29  /* additional information may be included depending on the implementation */
30} T_CSEM;
31
32/*
33 *  sematr - Semaphore Attribute Values
34 */
35
36#define TA_TFIFO   0x00   /* waiting tasks are handled by FIFO */
37#define TA_TPRI    0x01   /* waiting tasks are handled by priority */
38
39#define _ITRON_SEMAPHORE_UNUSED_ATTRIBUTES ~(TA_TPRI)
40
41/*
42 *  Reference Semaphore (ref_sem) Structure
43 */
44
45typedef struct t_rsem {
46  VP      exinf;    /* extended information */
47  BOOL_ID wtsk;     /* indicates whether or not there is a waiting task */
48  INT     semcnt;   /* current semaphore count */
49  /* additional information may be included depending on the implementation */
50} T_RSEM;
51
52/*
53 *  Semaphore Functions
54 */
55
56/*
57 *  cre_sem - Create Semaphore
58 */
59
60ER cre_sem(
61  ID semid,
62  T_CSEM *pk_csem
63);
64
65/*
66 *  del_sem - Delete Semaphore
67 */
68
69ER del_sem(
70  ID semid
71);
72
73/*
74 *  sig_sem - Signal Semaphore
75 */
76
77ER sig_sem(
78  ID semid
79);
80
81/*
82 *  wai_sem - Wait on Semaphore
83 */
84
85ER wai_sem(
86  ID semid
87);
88
89/*
90 *  preq_sem - Poll and Request Semaphore
91 */
92
93ER preq_sem(
94  ID semid
95);
96
97/*
98 *  twai_sem - Wait on Semaphore with Timeout
99 */
100
101ER twai_sem(
102  ID semid,
103  TMO tmout
104);
105
106/*
107 *  ref_sem - Reference Semaphore Status
108 */
109
110ER ref_sem(
111  ID      semid,
112  T_RSEM *pk_rsem
113);
114
115#ifdef __cplusplus
116}
117#endif
118
119#endif
120/* end of include file */
121
Note: See TracBrowser for help on using the repository browser.