On Tue, 4 Sep 2018 21:16:07 +0800 fei phung <feiphung27@xxxxxxxxx> wrote: > Hi everyone, > > I am working on https://github.com/promach/riffa/tree/full_duplex > > While I modifying the linux driver, I faced some issue using yield(). > > Why riffa_driver.c yield() function > https://gist.github.com/promach/7716ee8addcaa33fda140d74d1ad94d6#file-riffa_driver-c-L746 > > does not yield to chnl_send() thread > https://gist.github.com/promach/7716ee8addcaa33fda140d74d1ad94d6#file-riffa_driver-c-L883 > ? > > See https://stackoverflow.com/questions/52166325/why-yield-and-cond-resched-do-not-yield-to-another-thread > for more details > _______________________________________________ > devel mailing list > devel@xxxxxxxxxxxxxxxxxxxxxx > http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel Using yield in modern code is almost always wrong. It has priority inversion and latency issues. You are much better off using a real syncronization primitive (like completion or wait). _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel