source: rtems/cpukit/score/src/objectactivecount.c @ 8a8b95aa

5
Last change on this file since 8a8b95aa was 1c2d178, checked in by Sebastian Huber <sebastian.huber@…>, on 11/25/18 at 19:15:26

score: Remove Objects_Information::maximum

This information is already present in Objects_Information::maximum_id.
Add and use _Objects_Get_maximum_index().

Update #3621.

  • Property mode set to 100644
File size: 863 bytes
Line 
1/*
2 * Copyright (c) 2012 embedded brains GmbH.  All rights reserved.
3 *
4 *  embedded brains GmbH
5 *  Obere Lagerstr. 30
6 *  82178 Puchheim
7 *  Germany
8 *  <rtems@embedded-brains.de>
9 *
10 * The license and distribution terms for this file may be
11 * found in the file LICENSE in this distribution or at
12 * http://www.rtems.org/license/LICENSE.
13 */
14
15#if HAVE_CONFIG_H
16  #include "config.h"
17#endif
18
19#include <rtems/score/objectimpl.h>
20#include <rtems/score/assert.h>
21#include <rtems/score/chainimpl.h>
22
23Objects_Maximum _Objects_Active_count(
24  const Objects_Information *information
25)
26{
27  Objects_Maximum inactive;
28  Objects_Maximum maximum;
29
30  _Assert( _Objects_Allocator_is_owner() );
31
32  inactive = (Objects_Maximum)
33    _Chain_Node_count_unprotected( &information->Inactive );
34  maximum  = _Objects_Get_maximum_index( information );
35
36  return maximum - inactive;
37}
Note: See TracBrowser for help on using the repository browser.