コード例 #1
0
bool _Chain_Prepend_with_empty_check(
  Chain_Control *chain,
  Chain_Node *node
)
{
  ISR_Level level;
  bool was_empty;

  _ISR_Disable( level );
  was_empty = _Chain_Prepend_with_empty_check_unprotected( chain, node );
  _ISR_Enable( level );

  return was_empty;
}
コード例 #2
0
ファイル: chainprotected.c プロジェクト: Dipupo/rtems
bool rtems_chain_prepend_with_empty_check(
  rtems_chain_control *chain,
  rtems_chain_node *node
)
{
  bool was_empty;
  rtems_interrupt_lock_context lock_context;

  chain_acquire( &lock_context );
  was_empty = _Chain_Prepend_with_empty_check_unprotected( chain, node );
  chain_release( &lock_context );

  return was_empty;
}
コード例 #3
0
ファイル: chainsmp.c プロジェクト: hazirguo/rtems
bool rtems_chain_prepend_with_empty_check(
    rtems_chain_control *chain,
    rtems_chain_node *node
)
{
    bool was_empty;
    ISR_Level level;

    _ISR_lock_ISR_disable_and_acquire( &chain->Lock, level );
    was_empty = _Chain_Prepend_with_empty_check_unprotected(
                    &chain->Chain,
                    node
                );
    _ISR_lock_Release_and_ISR_enable( &chain->Lock, level );

    return was_empty;
}