Re: preempt_disable and sleep()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2010-05-14 at 00:02 +0530, ratheesh k wrote:
> I am running RT linux .
> 
> /* code snippet */
> 
> preempt_disable()
> ...........
> sleep(10);
> '............
> preempt_enable()
> 
> 
> will this sleep() will cause reschedule ?.
> 

Why would you do this?

If you had tried this code, you would have seen the corresponding stack
dump on the console.

> if an interrupt comes  while premption is disabled , how it is handled ?.
> 

Depends on the number of (idle) cores, the setting of CONFIG_PREEMPT_[]
and the type of interrupt.

RT threaded IRQs would not run until preemption is enabled on a single
core system.



> Thanks,
> Ratheesh
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux