source: rtems/cpukit/itron/include/rtems/itron/object.h @ c4a3f1e

Last change on this file since c4a3f1e was c4a3f1e, checked in by Joel Sherrill <joel.sherrill@…>, on 09/04/03 at 18:46:52

2003-09-04 Joel Sherrill <joel@…>

  • include/itron.h, include/itronsys/eventflags.h, include/itronsys/fmempool.h, include/itronsys/intr.h, include/itronsys/mbox.h, include/itronsys/msgbuffer.h, include/itronsys/network.h, include/itronsys/port.h, include/itronsys/semaphore.h, include/itronsys/status.h, include/itronsys/sysmgmt.h, include/itronsys/task.h, include/itronsys/time.h, include/itronsys/types.h, include/itronsys/vmempool.h, include/rtems/itron/config.h, include/rtems/itron/eventflags.h, include/rtems/itron/fmempool.h, include/rtems/itron/intr.h, include/rtems/itron/itronapi.h, include/rtems/itron/mbox.h, include/rtems/itron/msgbuffer.h, include/rtems/itron/network.h, include/rtems/itron/object.h, include/rtems/itron/port.h, include/rtems/itron/semaphore.h, include/rtems/itron/sysmgmt.h, include/rtems/itron/task.h, include/rtems/itron/time.h, include/rtems/itron/vmempool.h, inline/rtems/itron/eventflags.inl, inline/rtems/itron/fmempool.inl, inline/rtems/itron/intr.inl, inline/rtems/itron/mbox.inl, inline/rtems/itron/msgbuffer.inl, inline/rtems/itron/network.inl, inline/rtems/itron/port.inl, inline/rtems/itron/semaphore.inl, inline/rtems/itron/sysmgmt.inl, inline/rtems/itron/task.inl, inline/rtems/itron/time.inl, inline/rtems/itron/vmempool.inl, macros/rtems/itron/eventflags.inl, macros/rtems/itron/fmempool.inl, macros/rtems/itron/intr.inl, macros/rtems/itron/mbox.inl, macros/rtems/itron/msgbuffer.inl, macros/rtems/itron/network.inl, macros/rtems/itron/port.inl, macros/rtems/itron/semaphore.inl, macros/rtems/itron/sysmgmt.inl, macros/rtems/itron/task.inl, macros/rtems/itron/time.inl, macros/rtems/itron/vmempool.inl, src/can_wup.c, src/chg_pri.c, src/cre_mbf.c, src/cre_mbx.c, src/cre_sem.c, src/cre_tsk.c, src/del_mbf.c, src/del_mbx.c, src/del_sem.c, src/del_tsk.c, src/dis_dsp.c, src/ena_dsp.c, src/eventflags.c, src/exd_tsk.c, src/ext_tsk.c, src/fmempool.c, src/frsm_tsk.c, src/get_tid.c, src/itronintr.c, src/itronsem.c, src/itrontime.c, src/mbox.c, src/mboxtranslatereturncode.c, src/msgbuffer.c, src/msgbuffertranslatereturncode.c, src/network.c, src/port.c, src/prcv_mbf.c, src/prcv_mbx.c, src/preq_sem.c, src/psnd_mbf.c, src/rcv_mbf.c, src/rcv_mbx.c, src/ref_mbf.c, src/ref_mbx.c, src/ref_sem.c, src/ref_tsk.c, src/rel_wai.c, src/rot_rdq.c, src/rsm_tsk.c, src/sig_sem.c, src/slp_tsk.c, src/snd_mbf.c, src/snd_mbx.c, src/sta_tsk.c, src/sus_tsk.c, src/sysmgmt.c, src/task.c, src/ter_tsk.c, src/trcv_mbf.c, src/trcv_mbx.c, src/tslp_tsk.c, src/tsnd_mbf.c, src/twai_sem.c, src/vmempool.c, src/wai_sem.c, src/wup_tsk.c: URL for license changed.
  • Property mode set to 100644
File size: 3.3 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.rtems.com/license/LICENSE.
8 *
9 *  $Id$
10 */
11
12#ifndef __RTEMS_ITRON_OBJECT_h_
13#define __RTEMS_ITRON_OBJECT_h_
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19#include <rtems/score/object.h>
20
21typedef Objects_Control ITRON_Objects_Control;
22
23/*
24 *  Maximum length of an ITRON object name
25 *
26 *  NOTE:  Since ITRON objects do not have names, then then length is 0.
27 */
28
29#define ITRON_MAXIMUM_NAME_LENGTH 0
30
31/*
32 *  _ITRON_Objects_Open
33 *
34 *  Make this ITRON object visible to the system.
35 *
36 *  NOTE:  This macro hides the fact that ITRON objects don't have names.
37 */
38
39#define _ITRON_Objects_Open( _the_information, _the_object ) \
40    _Objects_Open( (_the_information), (_the_object), NULL )
41
42/*
43 *  _ITRON_Objects_Close
44 *
45 *  Make this ITRON object invisible from the system.  Usually used as
46 *  the first step of deleting an object.
47 */
48
49#define _ITRON_Objects_Close( _the_information, _the_object ) \
50    _Objects_Close( (_the_information), (_the_object) )
51
52/*
53 *  _ITRON_Objects_Allocate_by_index
54 *
55 *  Allocate the ITRON object specified by "_id".  The ITRON id is the
56 *  index portion of the traditional RTEMS ID.  The Classic and POSIX
57 *  APIs do not require that a specific object be allocated.
58 */
59
60#define _ITRON_Objects_Allocate_by_index( _the_information, _id, _sizeof ) \
61    _Objects_Allocate_by_index( (_the_information), (_id), (_sizeof) )
62
63/*
64 *  _ITRON_Objects_Clarify_allocation_id_error
65 *
66 *  This function is invoked when an object allocation ID error
67 *  occurs to determine the specific ITRON error code to return.
68 */
69
70#define _ITRON_Objects_Clarify_allocation_id_error( _the_information, _id ) \
71  (((_id) < -4) ? E_OACV : /* attempt to access a "system object" */ \
72  ((_id) <= 0) ? E_ID :    /* bogus index of 0 - -3 */ \
73  ((_id) <= (_the_information)->maximum) ? E_OBJ : /* object is in use */ \
74   E_ID)  /* simply a bad id */
75
76/*
77 *  _ITRON_Objects_Clarify_get_id_error
78 *
79 *  This function is invoked when an object get ID error
80 *  occurs to determine the specific ITRON error code to return.
81 */
82 
83#define _ITRON_Objects_Clarify_get_id_error( _the_information, _id ) \
84  (((_id) < -4) ? E_OACV : /* attempt to access a "system object" */ \
85  ((_id) <= 0) ? E_ID :    /* bogus index of 0 - -3 */ \
86  ((_id) <= (_the_information)->maximum) ? E_NOEXS : /* does not exist */ \
87   E_ID)  /* simply a bad id */
88
89
90/*
91 *  _ITRON_Objects_Free
92 *
93 *  Free this ITRON object to the pool of inactive objects.  This
94 *  operation is the same as for the Classic and POSIX APIs.
95 */
96
97#define _ITRON_Objects_Free( _the_information, _the_object ) \
98    _Objects_Free( (_the_information), (_the_object) )
99
100
101/*
102 *  _ITRON_Objects_Get
103 *
104 *  Obtain (get) the pointer to the control block for the object
105 *  specified by "id".  The ITRON id passed in here is simply
106 *  the "index" portion of the traditional RTEMS ID.  This
107 *  requires that this operation be slightly different
108 *  from the object get used by the Classic and POSIX APIs.
109 */
110
111#define _ITRON_Objects_Get( _the_information, _id, _the_object ) \
112    _Objects_Get_by_index( (_the_information), (_id), (_the_object) )
113
114#ifdef __cplusplus
115}
116#endif
117
118#endif
119/* end of include file */
120
Note: See TracBrowser for help on using the repository browser.