Chapter 6. Common Examples

Table of Contents

All In User Context
Accessing From Interrupt Context
Exposing Objects Outside This File
Using Atomic Operations For The Reference Count
Protecting The Objects Themselves

Let's step through a simple example: a cache of number to name mappings. The cache keeps a count of how often each of the objects is used, and when it gets full, throws out the least used one.