source: rtems/cpukit/score/src/rbtreefindheader.c @ bd9baa81

4.115
Last change on this file since bd9baa81 was bd9baa81, checked in by Joel Sherrill <joel.sherrill@…>, on 04/04/11 at 18:44:16

2010-07-28 Gedare Bloom <giddyup44@…>

PR 1641/cpukit

  • sapi/Makefile.am, sapi/preinstall.am, score/Makefile.am, score/preinstall.am: Add Red Black Tree data structure to score.
  • sapi/include/rtems/rbtree.h, sapi/inline/rtems/rbtree.inl, score/include/rtems/score/rbtree.h, score/inline/rtems/score/rbtree.inl, score/src/rbtree.c, score/src/rbtreeextract.c, score/src/rbtreefind.c, score/src/rbtreefindheader.c, score/src/rbtreeget.c, score/src/rbtreeinsert.c, score/src/rbtreepeek.c: New files.
  • Property mode set to 100644
File size: 1.1 KB
Line 
1/*
2 *  Copyright (c) 2010 Gedare Bloom.
3 *
4 *  The license and distribution terms for this file may be
5 *  found in the file LICENSE in this distribution or at
6 *  http://www.rtems.com/license/LICENSE.
7 *
8 *  $Id$
9 */
10
11#if HAVE_CONFIG_H
12#include "config.h"
13#endif
14
15#include <rtems/system.h>
16#include <rtems/score/address.h>
17#include <rtems/score/rbtree.h>
18#include <rtems/score/isr.h>
19
20/*
21 *  _RBTree_Find_header
22 *
23 *  This kernel routine returns a pointer to the rbtree header of the tree
24 *  containing the given node.
25 *
26 *  Input parameters:
27 *    the_node - pointer to rbtree node
28 *
29 *  Output parameters:
30 *    return_header - pointer to control header of rbtree
31 *    NULL   - if there is no control header available (the node is not part
32 *    of a tree)
33 *
34 *  INTERRUPT LATENCY:
35 *    only case
36 */
37
38RBTree_Control *_RBTree_Find_header(
39  RBTree_Node *the_node
40)
41{
42  ISR_Level          level;
43  RBTree_Control *return_header;
44
45  return_header = NULL;
46  _ISR_Disable( level );
47      return_header = _RBTree_Find_header_unprotected( the_node );
48  _ISR_Enable( level );
49  return return_header;
50}
Note: See TracBrowser for help on using the repository browser.