RTEMS  5.0.0
assoc.h
Go to the documentation of this file.
1 
11 #ifndef _RTEMS_RTEMS_ASSOC_H
12 #define _RTEMS_RTEMS_ASSOC_H
13 
19 #include <stddef.h>
20 #include <stdint.h>
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 typedef struct {
27  const char *name;
28  uint32_t local_value;
29  uint32_t remote_value;
31 
32 /*
33  * Flag/marker for optional default value in each table
34  */
35 
36 #define RTEMS_ASSOC_DEFAULT_NAME "(default)"
37 
42  const rtems_assoc_t *,
43  const char *
44 );
45 
50  const rtems_assoc_t *,
51  uint32_t
52 );
53 
54 uint32_t rtems_assoc_remote_by_local(
55  const rtems_assoc_t *,
56  uint32_t
57 );
58 
63  const rtems_assoc_t *,
64  uint32_t
65 );
66 
71  const rtems_assoc_t *,
72  const char *
73 );
74 
79  const rtems_assoc_t *,
80  const char *
81 );
82 
86 const char *rtems_assoc_name_by_local(
87  const rtems_assoc_t *,
88  uint32_t
89 );
90 
94 const char *rtems_assoc_name_by_remote(
95  const rtems_assoc_t *,
96  uint32_t
97 );
98 
103  const rtems_assoc_t *,
104  uint32_t
105 );
106 
111  const rtems_assoc_t *,
112  uint32_t ,
113  char *
114 );
115 
120  const rtems_assoc_t *,
121  uint32_t ,
122  char *
123 );
124 
125 uint32_t rtems_assoc_local_by_remote_bitfield(
126  const rtems_assoc_t *,
127  uint32_t
128 );
129 
134  const rtems_assoc_t *ap,
135  uint32_t local_value
136 );
137 
138 #if defined(INSIDE_ASSOC)
139 
140 #define rtems_assoc_is_default(_ap) \
141  ((_ap)->name && !strcmp((_ap)->name, RTEMS_ASSOC_DEFAULT_NAME))
142 
149 const char *rtems_assoc_name_bad(
150  uint32_t bad_value
151 );
152 #endif
153 
154 typedef struct {
155  uint32_t bits;
156  const char *name;
158 
175  uint32_t value,
176  char *buffer,
177  size_t buffer_size,
178  const rtems_assoc_32_pair *pairs,
179  size_t pair_count,
180  const char *separator,
181  const char *fallback
182 );
183 
195  uint32_t states,
196  char *buffer,
197  size_t buffer_size
198 );
199 
200 #ifdef __cplusplus
201 }
202 #endif
203 
204 #endif /* ! _RTEMS_RTEMS_ASSOC_H */
Definition: assoc.h:26
uint32_t rtems_assoc_remote_by_local_bitfield(const rtems_assoc_t *, uint32_t)
RTEMS Assoc Routines.
Definition: assocremotebylocalbitfield.c:29
const rtems_assoc_t * rtems_assoc_ptr_by_remote(const rtems_assoc_t *, uint32_t)
RTEMS Associate Pointer by Remote.
Definition: assocptrbyremote.c:19
size_t rtems_assoc_32_to_string(uint32_t value, char *buffer, size_t buffer_size, const rtems_assoc_32_pair *pairs, size_t pair_count, const char *separator, const char *fallback)
Converts the specified value into a text representation.
Definition: assoc32tostring.c:27
size_t rtems_assoc_thread_states_to_string(uint32_t states, char *buffer, size_t buffer_size)
Converts the specified thread states into a text representation.
Definition: assocthreadstatestostring.c:42
char * rtems_assoc_name_by_remote_bitfield(const rtems_assoc_t *, uint32_t, char *)
RTEMS Associate Name by Remote Bitfield.
Definition: assocnamebyremotebitfield.c:20
char * rtems_assoc_name_by_local_bitfield(const rtems_assoc_t *, uint32_t, char *)
RTEMS Associate Name by Local Bitfield.
Definition: assocnamebylocalbitfield.c:19
uint32_t rtems_assoc_local_by_name(const rtems_assoc_t *, const char *)
RTEMS Associate Local by Name.
Definition: assoclocalbyname.c:28
uint32_t rtems_assoc_remote_by_name(const rtems_assoc_t *, const char *)
RTEMS Associate Remote by Name.
Definition: assocremotebyname.c:19
uint32_t rtems_assoc_local_by_remote(const rtems_assoc_t *, uint32_t)
RTEMS Associate Local by Remote.
Definition: assoclocalbyremote.c:19
const char * rtems_assoc_name_by_local(const rtems_assoc_t *, uint32_t)
RTEMS Associate Name by Local.
Definition: assocnamebylocal.c:19
const char * rtems_assoc_name_by_remote(const rtems_assoc_t *, uint32_t)
RTEMS Associate Name by Remote.
Definition: assocnamebyremote.c:20
const rtems_assoc_t * rtems_assoc_ptr_by_name(const rtems_assoc_t *, const char *)
RTEMS Associate Pointer by Name.
Definition: assocptrbyname.c:20
const rtems_assoc_t * rtems_assoc_ptr_by_local(const rtems_assoc_t *ap, uint32_t local_value)
RTEMS Associate Pointer by Local.
Definition: assocptrbylocal.c:19
Definition: assoc.h:154