[b06e68ef] | 1 | /* |
---|
[c64e4ed4] | 2 | * @(#)assoc.h 1.4 - 95/10/25 |
---|
[b06e68ef] | 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 { |
---|
[c64e4ed4] | 16 | const char *name; |
---|
[b06e68ef] | 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 | |
---|
[c64e4ed4] | 27 | const rtems_assoc_t *rtems_assoc_ptr_by_name(const rtems_assoc_t *, const char *); |
---|
| 28 | const rtems_assoc_t *rtems_assoc_ptr_by_value(const rtems_assoc_t *, unsigned32); |
---|
| 29 | const rtems_assoc_t *rtems_assoc_ptr_by_remote(const rtems_assoc_t *, unsigned32); |
---|
| 30 | |
---|
| 31 | unsigned32 rtems_assoc_remote_by_local(const rtems_assoc_t *, unsigned32); |
---|
| 32 | unsigned32 rtems_assoc_local_by_remote(const rtems_assoc_t *, unsigned32); |
---|
| 33 | unsigned32 rtems_assoc_remote_by_name(const rtems_assoc_t *, const char *); |
---|
| 34 | unsigned32 rtems_assoc_local_by_name(const rtems_assoc_t *, const char *); |
---|
| 35 | const char *rtems_assoc_name_by_local(const rtems_assoc_t *, unsigned32); |
---|
| 36 | const char *rtems_assoc_name_by_remote(const rtems_assoc_t *, unsigned32); |
---|
| 37 | |
---|
| 38 | unsigned32 rtems_assoc_remote_by_local_bitfield(const rtems_assoc_t *, unsigned32); |
---|
| 39 | char *rtems_assoc_name_by_local_bitfield(const rtems_assoc_t *, unsigned32, char *); |
---|
| 40 | char *rtems_assoc_name_by_remote_bitfield(const rtems_assoc_t *, unsigned32, char *); |
---|
| 41 | unsigned32 rtems_assoc_local_by_remote_bitfield(const rtems_assoc_t *, unsigned32); |
---|
[b06e68ef] | 42 | |
---|
| 43 | |
---|
| 44 | #endif /* ! _INCLUDE_ASSOC_H */ |
---|