source: rtems/cpukit/rtems/src/rtemsobjectgetapiname.c @ 05c1886

4.104.115
Last change on this file since 05c1886 was 05c1886, checked in by Ralf Corsepius <ralf.corsepius@…>, on 11/30/09 at 16:01:51

Whitespace removal.

  • Property mode set to 100644
File size: 934 bytes
Line 
1/*
2 *  RTEMS Object Helper -- Obtain Name of API
3 *
4 *  COPYRIGHT (c) 1989-2008.
5 *  On-Line Applications Research Corporation (OAR).
6 *
7 *  The license and distribution terms for this file may be
8 *  found in the file LICENSE in this distribution or at
9 *  http://www.rtems.com/license/LICENSE.
10 *
11 *  $Id$
12 */
13
14#ifdef HAVE_CONFIG_H
15#include "config.h"
16#endif
17
18#include <rtems/system.h>
19#include <rtems/score/object.h>
20#include <rtems/rtems/object.h>
21
22#include <rtems/assoc.h>
23
24rtems_assoc_t rtems_objects_api_assoc[] = {
25  { "Internal", OBJECTS_INTERNAL_API, 0},
26  { "Classic",  OBJECTS_CLASSIC_API, 0},
27  { "POSIX",    OBJECTS_POSIX_API, 0},
28  { "ITRON",    OBJECTS_ITRON_API, 0},
29  { 0, 0, 0 }
30};
31
32const char *rtems_object_get_api_name(
33  int api
34)
35{
36  const rtems_assoc_t *api_assoc;
37
38  api_assoc = rtems_assoc_ptr_by_local( rtems_objects_api_assoc, api );
39  if ( api_assoc )
40    return api_assoc->name;
41  return "BAD CLASS";
42}
43
Note: See TracBrowser for help on using the repository browser.