Thread (2 messages) 2 messages, 2 authors, 2016-02-14

current during interrupt servicing

From: Mulyadi Santosa <hidden>
Date: 2016-02-14 18:10:53

On Sun, Feb 14, 2016 at 9:16 AM, tobaccopipeyoyo . <
tobaccopipeyoyo@gmail.com> wrote:
Hi,
I'm new to kernel programming, currently started ldd book
For the current process it says that global item current returns the
task_struct of the currently running process.

What if I refer this global during interrupt servicing?
What will happen? What should I expect.

Thanks,
tpyy
Hi...

during interrupt servicing, "current" will give you last process' data
structure that's get interrupted by the interrupt. Of course, this is per
cpu context, so if you are in SMP situation, current will return task
struct in that CPU only.

The essential thing in interrupt servicing is: interrupt handler runs on
behalf of current running process.

Hopefully I still recall all these correctly.


-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160215/005f337f/attachment.html 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help