schdule() doubt

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

 




actually i saw that ..
set_current_state (TASK_INTERRUPTIBLE)
schedule()

as far as i understood
these two are independent statements

where in first statement we just change the state variable in proces descriptor
and in 2nd statement we put process to actual sleep

now my ques is
if process is interrupted between these two statements by any means......
wont it be in some corrupt state
where its not sleeping but running but its state is changed to TASK_INTERRUPTIBLE...............


pl clarify why didnt we make these statements as one atomic statement ....


--
Thanks & Regards
Nidhi

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux