RTEMS
userextremoveset.c
Go to the documentation of this file.
1 
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 #ifdef HAVE_CONFIG_H
19 #include "config.h"
20 #endif
21 
23 #include <rtems/score/percpu.h>
24 
26  User_extensions_Control *the_extension
27 )
28 {
29  ISR_lock_Context lock_context;
30 
31  _User_extensions_Acquire( &lock_context );
34  &the_extension->Node
35  );
36  _Chain_Extract_unprotected( &the_extension->Node );
37  _User_extensions_Release( &lock_context );
38 
39  /*
40  * If a switch handler is present, remove it.
41  */
42 
43  if ( the_extension->Callouts.thread_switch != NULL ) {
44  ISR_lock_Context lock_context;
45 
46  _Per_CPU_Acquire_all( &lock_context );
47  _Chain_Extract_unprotected( &the_extension->Switch.Node );
48  _Per_CPU_Release_all( &lock_context );
49  }
50 }
static __inline__ void _Chain_Iterator_registry_update(Chain_Iterator_registry *the_registry, Chain_Node *the_node_to_extract)
Updates all iterators present in the chain iterator registry in case of a node extraction.
Definition: chainimpl.h:970
User Extension Handler API.
User_extensions_List _User_extensions_List
List of active extensions.
void _User_extensions_Remove_set(User_extensions_Control *the_extension)
Removes a user extension.
static __inline__ void _Chain_Extract_unprotected(Chain_Node *the_node)
Extracts this node (unprotected).
Definition: chainimpl.h:558
static void _User_extensions_Release(ISR_lock_Context *lock_context)
Releases the lock context and enables interrupts.
Definition: userextimpl.h:486
Chain_Iterator_registry Iterators
Chain iterator registration.
Definition: userextimpl.h:60
Manages each user extension set.
Definition: userextdata.h:50
Local ISR lock context for acquire and release pairs.
Definition: isrlock.h:65
static void _User_extensions_Acquire(ISR_lock_Context *lock_context)
Disables interrupts and acquires the lock context.
Definition: userextimpl.h:473