Changeset b80f920 in rtems for c/src/lib/libbsp/powerpc/qoriq/irq/irq.c
- Timestamp:
- 04/15/14 11:36:35 (9 years ago)
- Branches:
- 4.11, 5, master
- Children:
- 33d0666
- Parents:
- 487b94e7
- git-author:
- Sebastian Huber <sebastian.huber@…> (04/15/14 11:36:35)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (04/16/14 07:07:33)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/libbsp/powerpc/qoriq/irq/irq.c
r487b94e7 rb80f920 8 8 9 9 /* 10 * Copyright (c) 2010 , 2012embedded brains GmbH. All rights reserved.10 * Copyright (c) 2010-2014 embedded brains GmbH. All rights reserved. 11 11 * 12 12 * embedded brains GmbH 13 * Obere Lagerstr. 3013 * Dornierstr. 4 14 14 * 82178 Puchheim 15 15 * Germany … … 47 47 48 48 #define SPURIOUS 0xffff 49 50 static rtems_interrupt_lock lock = 51 RTEMS_INTERRUPT_LOCK_INITIALIZER("QorIQ IRQ"); 49 52 50 53 static const uint16_t vpr_and_dr_offsets [] = { … … 169 172 170 173 if (QORIQ_PIC_PRIORITY_IS_VALID(new_priority)) { 171 rtems_interrupt_l evel level;172 173 rtems_interrupt_ disable(level);174 rtems_interrupt_lock_context lock_context; 175 176 rtems_interrupt_lock_acquire(&lock, &lock_context); 174 177 old_vpr = *vpr; 175 178 *vpr = VPR_PRIORITY_SET(old_vpr, (uint32_t) new_priority); 176 rtems_interrupt_ enable(level);179 rtems_interrupt_lock_release(&lock, &lock_context); 177 180 } else if (new_priority < 0) { 178 181 old_vpr = *vpr; … … 221 224 int offs = vpr_and_dr_offsets [vector] << 2; 222 225 volatile uint32_t *vpr = (volatile uint32_t *) &qoriq.pic + offs; 223 rtems_interrupt_l evel level;224 225 rtems_interrupt_ disable(level);226 rtems_interrupt_lock_context lock_context; 227 228 rtems_interrupt_lock_acquire(&lock, &lock_context); 226 229 *vpr = (*vpr & ~VPR_MSK) | msk; 227 rtems_interrupt_ enable(level);230 rtems_interrupt_lock_release(&lock, &lock_context); 228 231 } 229 232
Note: See TracChangeset
for help on using the changeset viewer.