A technique for realtime-safe detection of a grace period for deferring
the destruction of a shared data element until pre-existing references to
the data element have been removed. A per-processor read/write lock is
established for each of one or more processors. When reading a shared
data element at a processor, the processor's read/write lock is acquired
for reading, the shared data element is referenced, and the read/write
lock that was acquired for reading is released. When starting a new grace
period, all of the read/write locks are acquired for writing, a new grace
period is started, and all of the read/write locks are released.