Changeset da1bafb in mainline for kernel/arch/amd64/src/interrupt.c


Ignore:
Timestamp:
2010-05-24T18:57:31Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0095368
Parents:
666f492
Message:

major code revision

  • replace spinlocks taken with interrupts disabled with irq_spinlocks
  • change spacing (not indendation) to be tab-size independent
  • use unsigned integer types where appropriate (especially bit flags)
  • visual separation
  • remove argument names in function prototypes
  • string changes
  • correct some formating directives
  • replace various cryptic single-character variables (t, a, m, c, b, etc.) with proper identifiers (thread, task, timeout, as, itm, itc, etc.)
  • unify some assembler constructs
  • unused page table levels are now optimized out in compile time
  • replace several ints (with boolean semantics) with bools
  • use specifically sized types instead of generic types where appropriate (size_t, uint32_t, btree_key_t)
  • improve comments
  • split asserts with conjuction into multiple independent asserts
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/src/interrupt.c

    r666f492 rda1bafb  
    106106}
    107107
    108 /** General Protection Fault. */
     108/** General Protection Fault.
     109 *
     110 */
    109111static void gp_fault(int n, istate_t *istate)
    110112{
    111113        if (TASK) {
    112                 size_t ver;
    113 
    114                 spinlock_lock(&TASK->lock);
    115                 ver = TASK->arch.iomapver;
    116                 spinlock_unlock(&TASK->lock);
    117 
     114                irq_spinlock_lock(&TASK->lock, false);
     115                size_t ver = TASK->arch.iomapver;
     116                irq_spinlock_unlock(&TASK->lock, false);
     117               
    118118                if (CPU->arch.iomapver_copy != ver) {
    119119                        /*
     
    129129                fault_if_from_uspace(istate, "General protection fault.");
    130130        }
    131 
     131       
    132132        decode_istate(n, istate);
    133133        panic("General protection fault.");
     
    159159#endif
    160160
    161 /** Handler of IRQ exceptions */
     161/** Handler of IRQ exceptions.
     162 *
     163 */
    162164static void irq_interrupt(int n, istate_t *istate)
    163165{
     
    174176                 * The IRQ handler was found.
    175177                 */
    176                  
     178               
    177179                if (irq->preack) {
    178180                        /* Send EOI before processing the interrupt */
     
    181183                }
    182184                irq->handler(irq);
    183                 spinlock_unlock(&irq->lock);
     185                irq_spinlock_unlock(&irq->lock, false);
    184186        } else {
    185187                /*
Note: See TracChangeset for help on using the changeset viewer.