Beispiel #1
0
bool rtems_chain_get_with_empty_check(
  rtems_chain_control *chain,
  rtems_chain_node **node
)
{
  bool is_empty_now;
  rtems_interrupt_lock_context lock_context;

  chain_acquire( &lock_context );
  is_empty_now = _Chain_Get_with_empty_check_unprotected( chain, node );
  chain_release( &lock_context );

  return is_empty_now;
}
Beispiel #2
0
bool _Chain_Get_with_empty_check(
  Chain_Control *chain,
  Chain_Node **node
)
{
  ISR_Level level;
  bool is_empty_now;

  _ISR_Disable( level );
  is_empty_now = _Chain_Get_with_empty_check_unprotected( chain, node );
  _ISR_Enable( level );

  return is_empty_now;
}
Beispiel #3
0
bool rtems_chain_get_with_empty_check(
    rtems_chain_control *chain,
    rtems_chain_node **node
)
{
    bool is_empty_now;
    ISR_Level level;

    _ISR_lock_ISR_disable_and_acquire( &chain->Lock, level );
    is_empty_now = _Chain_Get_with_empty_check_unprotected(
                       &chain->Chain,
                       node
                   );
    _ISR_lock_Release_and_ISR_enable( &chain->Lock, level );

    return is_empty_now;
}