source: rtems/cpukit/score/src/userextremoveset.c @ c01401c4

5
Last change on this file since c01401c4 was c01401c4, checked in by Sebastian Huber <sebastian.huber@…>, on 03/30/16 at 04:56:07

score: _User_extensions_Remove_set()

Use unprotected chain operation in _User_extensions_Remove_set() since
the caller must own the object allocator lock.

Update #2555.

  • Property mode set to 100644
File size: 961 bytes
Line 
1/**
2 * @file
3 *
4 * @ingroup ScoreUserExt
5 *
6 * @brief User Extension Handler implementation.
7 */
8
9/*
10 *  COPYRIGHT (c) 1989-2007.
11 *  On-Line Applications Research Corporation (OAR).
12 *
13 *  The license and distribution terms for this file may be
14 *  found in the file LICENSE in this distribution or at
15 *  http://www.rtems.org/license/LICENSE.
16 */
17
18#if HAVE_CONFIG_H
19#include "config.h"
20#endif
21
22#include <rtems/score/userextimpl.h>
23#include <rtems/score/objectimpl.h>
24#include <rtems/score/percpu.h>
25
26void _User_extensions_Remove_set (
27  User_extensions_Control  *the_extension
28)
29{
30  _Assert( _Objects_Allocator_is_owner() );
31
32  _Chain_Extract_unprotected( &the_extension->Node );
33
34  /*
35   * If a switch handler is present, remove it.
36   */
37
38  if ( the_extension->Callouts.thread_switch != NULL ) {
39    ISR_Level level;
40
41    _Per_CPU_Acquire_all( level );
42    _Chain_Extract_unprotected( &the_extension->Switch.Node );
43    _Per_CPU_Release_all( level );
44  }
45}
Note: See TracBrowser for help on using the repository browser.