Am 23.09.2016 um 14:59 schrieb Daniel Vetter daniel@ffwll.ch:
/**
- fence_put - decreases refcount of the fence
- @fence: [in] fence to reduce refcount of
- fence_get_rcu_safe - acquire a reference to an RCU tracked fence
- @fence: [in] pointer to fence to increase refcount of
- Function returns NULL if no refcount could be obtained, or the fence.
- This function handles acquiring a reference to a fence that may be
- reallocated within the RCU grace period (such as with SLAB_DESTROY_BY_RCU),
- so long as the caller is using RCU on the pointer to the fence.
- An alternative mechanism is to employ a seqlock to protect a bunch of
- fences, such as used by struct reservation_object. When using a seqlock,
- the seqlock must be taken before and checked after a reference to the
- fence is acquired (as shown here).
- The caller is required to hold the RCU read lock.
Would be good to cross reference the various fence_get functions a bit better in the docs. But since the docs aren't yet pulled into the rst/html output, that doesn't matter that much
Hi Daniel ... I'am working on ;-)
* http://return42.github.io/sphkerneldoc/linux_src_doc/include/linux/fence_h.h...
-- Markus --