Skip to Content
OS X and iOS Kernel Programming
book

OS X and iOS Kernel Programming

by Ole Henry Halvorsen, Douglas Clarke
December 2011
Intermediate to advanced
485 pages
15h 47m
English
Apress
Content preview from OS X and iOS Kernel Programming

Synchronization Primitives

Synchronization problems occur when code that is executing on two or more threads attempts to access a common resource or structure. A common synchronization problem for I/O Kit drivers arises when a driver needs to access its instance variables, since these are shared between all of the threads that the driver is executing. To give a concrete example, let's consider an actual example from the I/O Kit, namely, the OSObject base class's implementation of reference counting.

The OSObject class is the base class for all objects in the I/O Kit, and one of its roles is to maintain a reference count for each object instance and to release an object when its reference count is decremented to 0. A simplified version of the ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Linux Kernel Programming - Second Edition

Linux Kernel Programming - Second Edition

Kaiwan N. Billimoria
Linux Kernel Programming

Linux Kernel Programming

Kaiwan N. Billimoria

Publisher Resources

ISBN: 9781430235361Purchase book