Notice: We have migrated to GitLab launching 2024-05-01 see here: https://gitlab.rtems.org/

Ticket #2065: 0001-PR2065-RBTree-Insert-function-protected-does-not-ena.patch

File 0001-PR2065-RBTree-Insert-function-protected-does-not-ena.patch, 1.1 KB (added by Gedare Bloom, on 05/13/12 at 13:41:36)

Fix

  • cpukit/score/src/rbtreeinsert.c

    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  
    11/*
    2  *  Copyright (c) 2010 Gedare Bloom.
     2 *  Copyright (c) 2010-2012 Gedare Bloom.
    33 *
    44 *  The license and distribution terms for this file may be
    55 *  found in the file LICENSE in this distribution or at
    RBTree_Node *_RBTree_Insert( 
    148148)
    149149{
    150150  ISR_Level level;
     151  RBTree_Node *return_node;
    151152
    152153  _ISR_Disable( level );
    153     return _RBTree_Insert_unprotected( tree, node );
     154  return_node = _RBTree_Insert_unprotected( tree, node );
    154155  _ISR_Enable( level );
     156  return return_node;
    155157}