1 | /* |
---|
2 | * @(#)assoc.h 1.2 - 95/06/28 |
---|
3 | * |
---|
4 | * |
---|
5 | * Rtems associativity routines. Mainly used to convert a value from |
---|
6 | * one space to another (eg: our errno's to host errno's and v.v) |
---|
7 | * |
---|
8 | * |
---|
9 | * $Id$ |
---|
10 | */ |
---|
11 | |
---|
12 | #ifndef _INCLUDE_ASSOC_H |
---|
13 | #define _INCLUDE_ASSOC_H |
---|
14 | |
---|
15 | typedef struct { |
---|
16 | char *name; |
---|
17 | unsigned32 local_value; |
---|
18 | unsigned32 remote_value; |
---|
19 | } rtems_assoc_t; |
---|
20 | |
---|
21 | /* |
---|
22 | * Flag/marker for optional default value in each table |
---|
23 | */ |
---|
24 | |
---|
25 | #define RTEMS_ASSOC_DEFAULT_NAME "(default)" |
---|
26 | |
---|
27 | rtems_assoc_t *rtems_assoc_ptr_by_name(rtems_assoc_t *, char *); |
---|
28 | rtems_assoc_t *rtems_assoc_ptr_by_value(rtems_assoc_t *, unsigned32); |
---|
29 | rtems_assoc_t *rtems_assoc_ptr_by_remote(rtems_assoc_t *, unsigned32); |
---|
30 | |
---|
31 | unsigned32 rtems_assoc_remote_by_local(rtems_assoc_t *, unsigned32); |
---|
32 | unsigned32 rtems_assoc_local_by_remote(rtems_assoc_t *, unsigned32); |
---|
33 | unsigned32 rtems_assoc_remote_by_name(rtems_assoc_t *, char *); |
---|
34 | unsigned32 rtems_assoc_local_by_name(rtems_assoc_t *, char *); |
---|
35 | char *rtems_assoc_name_by_local(rtems_assoc_t *, unsigned32); |
---|
36 | char *rtems_assoc_name_by_remote(rtems_assoc_t *, unsigned32); |
---|
37 | |
---|
38 | unsigned32 rtems_assoc_remote_by_local_bitfield(rtems_assoc_t *, unsigned32); |
---|
39 | char *rtems_assoc_name_by_local_bitfield(rtems_assoc_t *, unsigned32, char *); |
---|
40 | char *rtems_assoc_name_by_remote_bitfield(rtems_assoc_t *, unsigned32, char *); |
---|
41 | unsigned32 rtems_assoc_local_by_remote_bitfield(rtems_assoc_t *ap, unsigned32); |
---|
42 | |
---|
43 | |
---|
44 | #endif /* ! _INCLUDE_ASSOC_H */ |
---|