Questions tagged [interrupt-handling]

The concept of handling system interrupts in an application or embedded system.

The concept of handling system interrupts in an application.

This tag may also refer to an operating-system-specific way of handling interrupts, or interrupt handling in a specific type of microcontroller or processor.

Use this tag only if you have reason to believe that your issue is directly related to interrupt handling. Do not use this tag if your application is using interrupt handling, but interrupt handling does not cause the issue your are asking about.

828 questions
3
votes
1 answer

What are these flags for workqueue means?

While studying workqueue, I came across WorkQueue flags & constants defined in kernel. I have following doubts which i could not understand. What exactly draining & rescuer mean here? WQ_DRAINING = 1 << 6, /* internal: workqueue is…
0x07FC
  • 523
  • 1
  • 6
  • 33
3
votes
2 answers

Starting a thread from inside an interrupt handler

I'm trying to start a thread as soon as an interrupt occurs. However, I have realized that I can't start a thread from within an interrupt handler (or any function that is directly or indirectly being called by the interrupt handler). So, what I…
Arash Fotouhi
  • 1,933
  • 2
  • 22
  • 43
3
votes
4 answers

IRQ Numbering Conflict

From: http://software.intel.com/en-us/articles/introduction-to-pc-architecture/ Exception number 10h corresponds to a "Floating Point Error" but software interrupt 10h also corresponds to "Video support" BIOS interrupts (both in real mode). What am…
anonymous
3
votes
2 answers

Suspend the program execution until interrupt is handled - how to achieve that?

I have created a kernel module, which handles interrupts. Also, there is a C program. This program causes interrupts during its execution. When the interrupt is coming, the program should be suspended, and stay suspended - until the interrupt…
Jake Badlands
  • 1,016
  • 3
  • 23
  • 46
3
votes
2 answers

Interrupt Handling on SMP Systems

Are Interrupts assigned to a fixed CPU (always handled by the same CPU)? To put my question in context: From: http://msdn.microsoft.com/en-us/library/ms795060.aspx The spin lock that protects the shared area has an IRQL equal to the DIRQL at which…
anon
  • 591
  • 2
  • 6
  • 11
3
votes
2 answers

Linux device driver - Threaded IRQ handler

Recently, I ran into a situation where I would like to use threaded IRQ's for a Keypad driver. For some background on threaded IRQ handlers: http://lwn.net/Articles/302043/ From what I understand, every time an IRQ would occur the IRQ handler thread…
3
votes
2 answers

Is interrupt handler running like this, and for how long?

I have some confusion when looking at how interrupt handler(ISR) is run. In Wiki http://en.wikipedia.org/wiki/Context_switch, it describes interrupt handling with 2 steps: 1) context switching When an interrupt occurs, the hardware automatically…
user1559625
  • 2,583
  • 5
  • 37
  • 75
3
votes
0 answers

AVAudioPlayer Interruption issue

I have a problem with AVAudioPlayer Interruption. And I'm not talking about the interruption during the incoming call. I can handle this situation very well. Call -> Interruption start -> End of call -> Interruption finish. The problem is with the…
iWheelBuy
  • 5,470
  • 2
  • 37
  • 71
3
votes
2 answers

get current->pid while in interrupt

I'm writing something on the linux scheduler and I need to know which process was running before my interrupt came in.. is the current structure available? If I do current->pid while in the interrupt handler, do I get the pid of the process I…
luca
  • 12,311
  • 15
  • 70
  • 103
2
votes
3 answers

Where to return from an interrupt

I've read (and studied) about Interrupt Handling. What I always fail to understand, is how do we know where to return to (PC / IP) from the Interrupt Handler. As I understand it: An Interrupt is caused by a device (say the keyboard) The relevant…
Trevor
  • 1,858
  • 4
  • 21
  • 28
2
votes
4 answers

Relocate the ARM exception vectors?

How would I relocate the ARM exception vectors? Basically, I need to be able to remap them in a way, so when the ARM core tries to execute the vector, it should execute the custom exception vector that is stored in kernel's RAM bit and not in the…
Kristina
  • 15,859
  • 29
  • 111
  • 181
2
votes
1 answer

Setting up Interrupt Vector Table, ARMv6

I'm trying to use usermode and SVC in my ARMv6 bare metal application, but for this I need to set up the SVC entry of the ARMv6 interrupt vector table to branch to my interrupt handler. But, I can't find a good example on how to do this (ie: what…
singpolyma
  • 10,999
  • 5
  • 47
  • 71
2
votes
1 answer

iPhone returns to black screen after sleep interrupt during splash screen

I've got a strange bug going on that seems to be OS related : If I give a sleep interrupt to my device while the OS controlled splash screen, Default.png, is displayed, and then immediately wake the device, I get a black screen until…
Ian
  • 3,806
  • 2
  • 20
  • 23
2
votes
1 answer

Call Int 13h in a ISR

I have written a ISR for int 9h by assembly in Real Mode. In this ISR, I call INT 13h, AH=0x02 for writing some data on Hard Disk. But data aren't written on Hard Disk. Also int 13h, ah=0x02 doesn't work too (Read data from Hard Disk). after call…
CoyBit
  • 1,592
  • 1
  • 17
  • 19
2
votes
0 answers

ARM real-time - How to avoid race conditions in interrupt service routines

On ARM Cortex M3 bare-metal real-time microcontroller application, I need to ensure that function dispatch() is called exactly once per interrupt. dispatch() uses global data and is hence not reentrant, so I also need to ensure that it does not get…
SRobertJames
  • 8,210
  • 14
  • 60
  • 107