fence_add_callback — add a callback to be called when the fence is signaled
int fence_add_callback ( | struct fence * fence, |
struct fence_cb * cb, | |
fence_func_t func) ; |
fence
[in] the fence to wait on
cb
[in] the callback to register
func
[in] the function to call
cb will be initialized by fence_add_callback, no initialization by the caller is required. Any number of callbacks can be registered to a fence, but a callback can only be registered to one fence at a time.
Note that the callback can be called from an atomic context. If fence is already signaled, this function will return -ENOENT (and *not* call the callback)
Add a software callback to the fence. Same restrictions apply to refcount as it does to fence_wait, however the caller doesn't need to