Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Questions on semaphore and wakeup

Status
Not open for further replies.

promach

Advanced Member level 4
Joined
Feb 22, 2016
Messages
1,199
Helped
2
Reputation
4
Reaction score
5
Trophy points
1,318
Activity points
11,636
For https://xillybus.com/downloads/doc/xillybus_host_programming_guide_linux.pdf#page=29 and https://gist.github.com/promach/3751054163042d255f818724934799ed#file-fifo-c-L198-L214 , do you guys have any comments on the following statements ?

"Since this usage prevents blocking, it’s possible to delete the while() loop in the implementation of fifo request write(), as it is never invoked. Further code reduction is possible by removing the relevant semaphore, as well as its initialization and destruction code."

Screenshot from 2017-12-26 18-49-04.png

Screenshot from 2017-12-26 17-04-52.png
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top