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
12
votes
2 answers

How to fire a command when a shell script is interrupted?

I want to fire a command like " rm -rf /etc/XXX.pid" when the shell script is interrupted in the middle of its execution. Like using CTRL+C Can anyone help me what to do here?
Jatin Bodarya
  • 1,425
  • 2
  • 20
  • 32
12
votes
2 answers

What happens when you disable interrupts, and what do you do with interrupts you don't know how to handle?

When you disable interrupts (with the cli instruction in x86), what exactly happens? Does the PIC wait for you to turn on interrupts, and fire the interrupt when that happens? (If so, how long does it wait, and what happens if the time…
user541686
  • 205,094
  • 128
  • 528
  • 886
11
votes
1 answer

Trigger Kernel Interrupt Handler: How?

I am trying to understand Asynchronous Interrupt handling in kernel, ofcourse through the legendary Understanding the Linux Kernel. In this process how and who will trigger Kernel Interrupt Handler? I would like some one to help me correcting this…
11
votes
4 answers

How to keep interrupts short?

The most heard advice in embedded programming is "keep your interrupts short". Now my situation is that I have a very long running task in my main() loop (writing large blocks of data to SDcard), which can sometimes take 100ms. So to keep my system…
Maestro
  • 9,046
  • 15
  • 83
  • 116
10
votes
3 answers

Interrupts disabled during Interrupt handling

Why are interrupts disabled when the kernel is currently handling an interrupt ? What if an interrupt carrying an important message is missed ?
kesari
  • 536
  • 1
  • 6
  • 16
10
votes
1 answer

STM32F411: is clearing an external interrupt flag really necessary?

I've bought an STM32F411 nucleo board and now I'm trying to understand various bits and pieces of the HAL. Starting with external interrupts seemed to be a good idea, because the board has a push button which is connected to PC13. So I've set up a…
Christoph
  • 1,040
  • 3
  • 14
  • 29
10
votes
5 answers

C printf() in interrupt handler?

I heard printf() in C is not supposed to be used in ISR. Is it because it's a blocking call, or is it because it's not re-entrant? If printf() is not re-entrant, then wouldn't it means that it can not be used for multi-thread program as well, unless…
user1559625
  • 2,583
  • 5
  • 37
  • 75
10
votes
3 answers

Uninterruptable process in Windows(or Linux)?

Is there any way to make a program that cannot be interrupted (an uninterrupted program)? By that, I mean a process that can't be terminated by any signal, kill command, or any other key combinations in any System: Linux, windows etc. First, I am…
Grijesh Chauhan
  • 57,103
  • 20
  • 141
  • 208
10
votes
4 answers

What happens to preempted interrupt handler?

I could not find a proper answer for the following questions even in some well written kernel books: They are saying that an ISR can't sleep because its not possible to reschedule an ISR as it is not connected with any process , so what happens…
9
votes
2 answers

Why does sem_wait not unblock (and return -1) on an interrupt?

I have a programme using sem_wait. The Posix specification says: The sem_wait() function is interruptible by the delivery of a signal. Additionally, in the section about errors it says: [EINTR] - A signal interrupted this function. However, in…
9
votes
2 answers

Can't interrupt tasks of ExecutorService

Edit: To test this problem outside of Android environment I've created a Java application that creates an ExecutorService, provides a task of AttackScript (identical class) and then terminates. This works 100% as expected, the thread is interrupted…
Themelis
  • 4,048
  • 2
  • 21
  • 45
9
votes
1 answer

What request_irq() does internally?

As I know it "allocate an interrupt line", but > what is happening after request_irq()? > How a particular handler is getting called on receiving interrupt? Can anybody explain it with code snipet?
9
votes
3 answers

How can I delay in a Linux interrupt handler (I know sleeping usually not possible)

I'm working on an embedded Linux ARM system that needs to react to a power failure signal by turning off some power supplies (via GPIO control) in a specific sequence. This process needs to start as soon as possible, so I've installed an interrupt…
Steve
  • 6,334
  • 4
  • 39
  • 67
9
votes
2 answers

What happens in the x86 architecture when an interrupt occurs?

I'm studying x86 and Real Time Systems, and I have a question, that is: Which steps x86 follows to handle any interrupt ?
Mehmet Ali
  • 91
  • 1
  • 2
9
votes
1 answer

what is the difference between PPI, SPI and SGI interrupts?

In ARM architecture I have read that there are 3 kinds of interrupt : PPI - Per processor interrupts SPI - Shared processor interrupts SGI - Software generated interrupts I want to know what are these, and how they are different from each other ?
Saurabh Sengar
  • 878
  • 2
  • 12
  • 20
1
2
3
55 56