Download C - Oracle Documentation
Transcript
Advanced Topics B This appendix contains a collection of topics. Not all drivers need to be concerned with the issues addressed. Multithreading This section supplements the guidelines presented in Chapter 4, “Multithreading,” for writing an MT-safe driver, a driver that safely supports multiple threads. Lock Granularity Here are some issues to consider when deciding on how many locks to use in a driver: • • • • • • The driver should allow as many threads as possible into the driver: this leads to fine-grained locking. However, it should not spend too much time executing the locking primitives: this approach leads to coarse-grained locking. Moreover, the code should be simple and maintainable. Avoid lock contention for shared data. Write reentrant code wherever possible. This makes it possible for many threads to execute without grabbing any locks. Use locks to protect the data and not the code path. 297
Related documents
C - Oracle Documentation
Writing Device Drivers
Chill radar user manual. Champaign, IL : Illinois State Water Survey
"user manual"
Automated analysis of security protocols with global state
AN3518 - Freescale Semiconductor
Note su Solaris 10 - Oracle Documentation
Deni 5226 Specifications
User`s Manual - SIE Computing Solutions
Red Hat ENTERPRISE LINUX 3 - DEVELOPER TOOLS GUIDE Specifications
PDF
Vista 120 (Manuale Utente) - Elektra2000 Installazioni