the difference between an embOS interrupt and a zero latency interrupt

the difference between an embOS interrupt and a zero latency interrupt is the interrupt priority level and the usage of OS_EnterInterrupt()/OS_LeaveInterrupt() or OS_EnterNestableInterrupt()/OS_LeaveNestableInterrupt().

Example of an embOS interrupt function:

void OS_COM_IsrHandler(void) {
  int Dummy;
  OS_EnterNestableInterrupt();
  Dummy = US_RHR;
  // Call embOS API functions here
  OS_LeaveNestableInterrupt();
}

void Uart_Init(void) {
  OS_ARM_InstallISRHandler(ISR_ID_USART, (OS_ISR_HANDLER*) OS_COM_IsrHandler);
  OS_ARM_ISRSetPrio(140);                      // Set prio > 128
  OS_ARM_EnableISR(ISR_ID_USART);
}

Example of a zero latency interrupt function:

void OS_COM_IsrHandler(void) {
  int Dummy;
  Dummy = US_RHR;
  // Never call embOS API functions here
}

void Uart_Init(void) {
  OS_ARM_InstallISRHandler(ISR_ID_USART, (OS_ISR_HANDLER*) OS_COM_IsrHandler);
  OS_ARM_ISRSetPrio(120);                      // Set prio < 128
  OS_ARM_EnableISR(ISR_ID_USART);
}
时间: 2024-08-05 02:23:24

the difference between an embOS interrupt and a zero latency interrupt的相关文章

Interrupt distribution scheme for a computer bus

A method of handling processor to processor interrupt requests in a multiprocessing computer bus environment is described. This method allows a multiple-tiered, increasing priority, interrupt request scheme. This method also allows processor to proce

Reentrant protected mode kernel using virtual 8086 mode interrupt service routines

A method for allowing a protected mode kernel to service, in virtual 8086 mode, hardware interrupts which occur during execution of ring 0 protected mode code. When an interrupt occurs during execution of ring 0 code, the microprocessor copies the?st

Input/output subsystem having an integrated advanced programmable interrupt controller for use in a personal computer

A computer system is described having one or more host processors, a host chipset and an input/output (I/O) subsystem. The host processors are connected to the host chipset by a host bus. The host chipset is connected to the input/output subsystem by

Thread的中断机制(interrupt)

http://www.cnblogs.com/onlywujun/p/3565082.html 中断线程 线程的thread.interrupt()方法是中断线程,将会设置该线程的中断状态位,即设置为true,中断的结果线程是死亡.还是等待新的任务或是继续运行至下一步,就取决于这个程序本身.线程会不时地检测这个中断标示位,以判断线程是否应该被中断(中断标示值是否为true).它并不像stop方法那样会中断一个正在运行的线程. 判断线程是否被中断 判断某个线程是否已被发送过中断请求,请使用Thre

PatentTips - Enhanced I/O Performance in a Multi-Processor System Via Interrupt Affinity Schemes

BACKGROUND OF THE INVENTION This relates to Input/Output (I/O) performance in a host system having multiple processors, and more particularly, to efficient usage of multiple processors in handling I/O completions by using interrupt affinity schemes t

openMSP之IO interrupt

IO interrupt Verilog file: omsp_gpio.v 1 //============================================================================ 2 // 4) INTERRUPT GENERATION 3 //============================================================================ 4 5 // Port 2 interr

Java多线程系列--“基础篇”09之 interrupt()和线程终止方式

概要 本章,会对线程的interrupt()中断和终止方式进行介绍.涉及到的内容包括:1. interrupt()说明2. 终止线程的方式2.1 终止处于“阻塞状态”的线程2.2 终止处于“运行状态”的线程3. 终止线程的示例4. interrupted() 和 isInterrupted()的区别 转载请注明出处:http://www.cnblogs.com/skywang12345/p/3479949.html 1. interrupt()说明 在介绍终止线程的方式之前,有必要先对inter

Thread 常搞混的几个概念sleep、wait、yield、interrupt (转)

原文网址:http://blog.csdn.net/partner4java/article/details/7993420sleep:在指定的毫秒数内让当前正在执行的线程休眠(暂停执行),此操作受到系统计时器和调度程序精度和准确性的影响.该线程不丢失任何监视器的所属权. 通过调用sleep使任务进入休眠状态,在这种情况下,任务在指定的时间内不会运行. 调用sleep的时候锁并没有被释放. Java SE5引入了更加显示的sleep()版本作为TimeUnit类的一部分,这个方法允许你指定sle

Linux中断(interrupt)子系统之二:arch相关的硬件封装层【转】

转自:http://blog.csdn.net/droidphone/article/details/7467436 版权声明:本文为博主原创文章,未经博主允许不得转载. 目录(?)[-] CPU的中断入口 初始化 中断控制器的软件抽象struct irq_chip 进入流控处理层 中断控制器的级联 Linux的通用中断子系统的一个设计原则就是把底层的硬件实现尽可能地隐藏起来,使得驱动程序的开发人员不用关注底层的实现,要实现这个目标,内核的开发者们必须把硬件相关的内容剥离出来,然后定义一些列标准