Linux.com

Interrupts

Link to this post 23 Jul 11

while understanding the interrupts, I saw the below line in hardirq.h.

#define SOFTIRQ_OFFSET (1UL << SOFTIRQ_SHIFT)

Can anyone please tell me what is 1UL means in the above line.


Thanks in advance

Regards
Kumar

Link to this post 23 Jul 11

ravi.chakram wrote:

while understanding the interrupts, I saw the below line in hardirq.h.

#define SOFTIRQ_OFFSET (1UL << SOFTIRQ_SHIFT)

Can anyone please tell me what is 1UL means in the above line.


Thanks in advance

Regards
Kumar

1 Unsigned Long = an "unsigned long" full of ones

Regards

PS: I'm no expert, I might be wrong!

Link to this post 31 Jul 11

UL means long unsigned int. 1 is left shifted by SOFTIRQ_SHIFT(8) times, that means value will be

0x00000100.

This macro is used to increment the softirq count in the thread_info->preempt_count at 0x00000100 offset.

For linux kernel articles, visit www.rulingminds.com

Link to this post 01 Aug 11

That RulingMinds site is very interesting, especially for kernel newbies like me. The videos could have been edited better, well, they could have been edited, but, all in all, I'd still say it's an interesting site.

Link to this post 01 Aug 11

rulingminds wrote:



This macro is used to increment the softirq count in the thread_info->preempt_count at 0x00000100 offset.

Great . But, is it incrementing the count at 0x00000100 or assigning/updating the soft-interrupts value as 0x00000100

My opinion is, it is doing the second one.

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board