blob: 7bb48c9a55212cd1591b47f0d5fbd6e8212854b1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
/*
* assoc.c
* rtems assoc routines
*
* $Id$
*/
#include <rtems.h>
#include <rtems/assoc.h>
#include <stdio.h> /* sprintf */
#include <string.h> /* strcat, strcmp */
#define STREQ(a,b) (strcmp((a), (b)) == 0)
#define rtems_assoc_is_default(ap) ((ap)->name && STREQ(ap->name, RTEMS_ASSOC_DEFAULT_NAME))
/*
* what to return if a value is not found
* this is not reentrant, but it really shouldn't be invoked anyway
*/
const char *
rtems_assoc_name_bad(
unsigned32 bad_value
)
{
#ifdef RTEMS_DEBUG
static char bad_buffer[32];
sprintf(bad_buffer, "< %d [0x%x] >", bad_value, bad_value);
#else
static char bad_buffer[32] = "<assoc.c: BAD NAME>";
#endif
return bad_buffer;
}
|