source: rtems/cpukit/libcsupport/src/assocptrbylocal.c @ e22af78

4.115
Last change on this file since e22af78 was 17c6ad6a, checked in by Alex Ivanov <alexivanov97@…>, on 12/11/12 at 21:51:08

libcsupport: Doxygen enhancement GCI task #4

http://www.google-melange.com/gci/task/view/google/gci2012/8009205

  • Property mode set to 100644
File size: 578 bytes
Line 
1/**
2 *  @file
3 *
4 *  @brief RTEMS Associate Pointer by Local
5 *  @ingroup Associativity
6 */
7
8#if HAVE_CONFIG_H
9#include "config.h"
10#endif
11
12#define INSIDE_ASSOC
13
14#include <rtems.h>
15#include <rtems/assoc.h>
16
17#include <string.h>             /* strcat, strcmp */
18
19const rtems_assoc_t *rtems_assoc_ptr_by_local(
20  const rtems_assoc_t *ap,
21  uint32_t             local_value
22)
23{
24  const rtems_assoc_t *default_ap = 0;
25
26  if (rtems_assoc_is_default(ap))
27    default_ap = ap++;
28
29  for ( ; ap->name; ap++)
30    if (ap->local_value == local_value)
31      return ap;
32
33  return default_ap;
34}
Note: See TracBrowser for help on using the repository browser.