source: rtems/cpukit/score/src/objectgetinfo.c @ 2d7ae960

4.115
Last change on this file since 2d7ae960 was 9b4422a2, checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/12 at 15:09:24

Remove All CVS Id Strings Possible Using a Script

Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines

next to each other after Id string line removed.

+ remove entire comment blocks which only exited to

contain CVS Ids

+ If the processing left a blank line at the top of

a file, it was removed.

  • Property mode set to 100644
File size: 1.3 KB
Line 
1/*
2 *  COPYRIGHT (c) 1989-2008.
3 *  On-Line Applications Research Corporation (OAR).
4 *
5 *  The license and distribution terms for this file may be
6 *  found in the file LICENSE in this distribution or at
7 *  http://www.rtems.com/license/LICENSE.
8 */
9
10#ifdef HAVE_CONFIG_H
11#include "config.h"
12#endif
13
14#include <rtems/system.h>
15#include <rtems/score/object.h>
16#include <rtems/score/thread.h>
17#include <rtems/score/wkspace.h>
18
19Objects_Information *_Objects_Get_information(
20  Objects_APIs   the_api,
21  uint16_t       the_class
22)
23{
24  Objects_Information *info;
25  int the_class_api_maximum;
26
27  if ( !the_class )
28    return NULL;
29
30  /*
31   *  This call implicitly validates the_api so we do not call
32   *  _Objects_Is_api_valid above here.
33   */
34  the_class_api_maximum = _Objects_API_maximum_class( the_api );
35  if ( the_class_api_maximum == 0 )
36    return NULL;
37
38  if ( the_class > (uint32_t) the_class_api_maximum )
39    return NULL;
40
41  if ( !_Objects_Information_table[ the_api ] )
42    return NULL;
43
44  info = _Objects_Information_table[ the_api ][ the_class ];
45  if ( !info )
46    return NULL;
47
48  /*
49   *  In a multprocessing configuration, we may access remote objects.
50   *  Thus we may have 0 local instances and still have a valid object
51   *  pointer.
52   */
53  #if !defined(RTEMS_MULTIPROCESSING)
54    if ( info->maximum == 0 )
55      return NULL;
56  #endif
57
58  return info;
59}
60
Note: See TracBrowser for help on using the repository browser.