Changeset 8dbb14d5 in rtems


Ignore:
Timestamp:
Nov 3, 2015, 10:14:21 AM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
c1e98cd
Parents:
aa47302
git-author:
Sebastian Huber <sebastian.huber@…> (11/03/15 10:14:21)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/05/15 10:30:21)
Message:

bsp/irq-server: Use proper chain API

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/shared/src/irq-server.c

    raa47302 r8dbb14d5  
    6464  bsp_interrupt_vector_disable(e->vector);
    6565
    66   if (e->node.next == NULL) {
     66  if (rtems_chain_is_node_off_chain(&e->node)) {
    6767    rtems_interrupt_lock_context lock_context;
    6868
     
    8181  rtems_interrupt_lock_context lock_context;
    8282  bsp_interrupt_server_entry *e;
     83  rtems_chain_control *chain;
    8384
    8485  rtems_interrupt_lock_acquire(&bsp_interrupt_server_lock, &lock_context);
    85 
    86   e = (bsp_interrupt_server_entry *)
    87     rtems_chain_get_unprotected(&bsp_interrupt_server_chain);
    88   if (e != NULL) {
    89     e->node.next = NULL;
     86  chain = &bsp_interrupt_server_chain;
     87
     88  if (!rtems_chain_is_empty(chain)) {
     89    e = (bsp_interrupt_server_entry *)
     90      rtems_chain_get_first_unprotected(chain);
     91    rtems_chain_set_off_chain(&e->node);
     92  } else {
     93    e = NULL;
    9094  }
    9195
Note: See TracChangeset for help on using the changeset viewer.