Problem with this code snippet.

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

 



Dear All,

Isn't there problem in this code snippet?
wake_up will called even before releasing spin lock.
If there are sleeping threads/processes, they will
wakeup and spinlock is never be unlocked. Am I wrong?

spin_lock(&ud->lock);
ud->event |= event;
wake_up(&ud->eh_waitq);
spin_unlock(&ud->lock);

Thanks
Best Regards
Himanshu

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[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