4.115
Last change
on this file since bc96bad6 was
9fc284c,
checked in by Sebastian Huber <sebastian.huber@…>, on 03/30/12 at 09:35:39
|
score/rbtree: Add const qualifier
|
-
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_Get |
---|
22 | * |
---|
23 | * This kernel routine returns a pointer to the min or max node on the tree, |
---|
24 | * without removing that node. |
---|
25 | * |
---|
26 | * Input parameters: |
---|
27 | * the_rbtree - pointer to rbtree header |
---|
28 | * dir - specifies whether to return minimum (0) or maximum (1) |
---|
29 | * |
---|
30 | * Output parameters: |
---|
31 | * return_node - pointer to node in rbtree allocated |
---|
32 | * NULL - if no nodes available |
---|
33 | * |
---|
34 | * INTERRUPT LATENCY: |
---|
35 | * only case |
---|
36 | */ |
---|
37 | |
---|
38 | RBTree_Node *_RBTree_Peek( |
---|
39 | const RBTree_Control *the_rbtree, |
---|
40 | RBTree_Direction dir |
---|
41 | ) |
---|
42 | { |
---|
43 | ISR_Level level; |
---|
44 | RBTree_Node *return_node; |
---|
45 | |
---|
46 | return_node = NULL; |
---|
47 | _ISR_Disable( level ); |
---|
48 | return_node = _RBTree_Peek_unprotected( the_rbtree, dir ); |
---|
49 | _ISR_Enable( level ); |
---|
50 | return return_node; |
---|
51 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.