From 2b36355b44e004c78872508a28f176fc1b146451 Mon Sep 17 00:00:00 2001
From: Gedare Bloom <gedare@rtems.org>
Date: Sun, 13 May 2012 10:40:10 -0400
Subject: [PATCH] PR2065: RBTree: Insert function (protected) does not enable interrupts
Save the return value from the unprotected version and return it after
enabling interrupts to their previous level.
---
cpukit/score/src/rbtreeinsert.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/cpukit/score/src/rbtreeinsert.c b/cpukit/score/src/rbtreeinsert.c
index 8789734..57a36b8 100644
a
|
b
|
|
1 | 1 | /* |
2 | | * Copyright (c) 2010 Gedare Bloom. |
| 2 | * Copyright (c) 2010-2012 Gedare Bloom. |
3 | 3 | * |
4 | 4 | * The license and distribution terms for this file may be |
5 | 5 | * found in the file LICENSE in this distribution or at |
… |
… |
RBTree_Node *_RBTree_Insert( |
148 | 148 | ) |
149 | 149 | { |
150 | 150 | ISR_Level level; |
| 151 | RBTree_Node *return_node; |
151 | 152 | |
152 | 153 | _ISR_Disable( level ); |
153 | | return _RBTree_Insert_unprotected( tree, node ); |
| 154 | return_node = _RBTree_Insert_unprotected( tree, node ); |
154 | 155 | _ISR_Enable( level ); |
| 156 | return return_node; |
155 | 157 | } |