diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1995-08-17 19:51:51 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1995-08-17 19:51:51 +0000 |
commit | b06e68ef1f6df69cc86d72356c3a002054a35fad (patch) | |
tree | 722b2da3cc83f1cf03019cab8cf895a509eb6801 /c/src/lib/include/rtems/assoc.h | |
parent | variable length messages (diff) | |
download | rtems-b06e68ef1f6df69cc86d72356c3a002054a35fad.tar.bz2 |
Numerous miscellaneous features incorporated from Tony Bennett
(tbennett@divnc.com) including the following major additions:
+ variable length messages
+ named devices
+ debug monitor
+ association tables/variables
Diffstat (limited to 'c/src/lib/include/rtems/assoc.h')
-rw-r--r-- | c/src/lib/include/rtems/assoc.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/c/src/lib/include/rtems/assoc.h b/c/src/lib/include/rtems/assoc.h new file mode 100644 index 0000000000..c820cfa973 --- /dev/null +++ b/c/src/lib/include/rtems/assoc.h @@ -0,0 +1,44 @@ +/* + * @(#)assoc.h 1.2 - 95/06/28 + * + * + * Rtems associativity routines. Mainly used to convert a value from + * one space to another (eg: our errno's to host errno's and v.v) + * + * + * $Id$ + */ + +#ifndef _INCLUDE_ASSOC_H +#define _INCLUDE_ASSOC_H + +typedef struct { + char *name; + unsigned32 local_value; + unsigned32 remote_value; +} rtems_assoc_t; + +/* + * Flag/marker for optional default value in each table + */ + +#define RTEMS_ASSOC_DEFAULT_NAME "(default)" + +rtems_assoc_t *rtems_assoc_ptr_by_name(rtems_assoc_t *, char *); +rtems_assoc_t *rtems_assoc_ptr_by_value(rtems_assoc_t *, unsigned32); +rtems_assoc_t *rtems_assoc_ptr_by_remote(rtems_assoc_t *, unsigned32); + +unsigned32 rtems_assoc_remote_by_local(rtems_assoc_t *, unsigned32); +unsigned32 rtems_assoc_local_by_remote(rtems_assoc_t *, unsigned32); +unsigned32 rtems_assoc_remote_by_name(rtems_assoc_t *, char *); +unsigned32 rtems_assoc_local_by_name(rtems_assoc_t *, char *); +char *rtems_assoc_name_by_local(rtems_assoc_t *, unsigned32); +char *rtems_assoc_name_by_remote(rtems_assoc_t *, unsigned32); + +unsigned32 rtems_assoc_remote_by_local_bitfield(rtems_assoc_t *, unsigned32); +char *rtems_assoc_name_by_local_bitfield(rtems_assoc_t *, unsigned32, char *); +char *rtems_assoc_name_by_remote_bitfield(rtems_assoc_t *, unsigned32, char *); +unsigned32 rtems_assoc_local_by_remote_bitfield(rtems_assoc_t *ap, unsigned32); + + +#endif /* ! _INCLUDE_ASSOC_H */ |