Go to the source code of this file.
Protect the buffer's contents by associating a native fence with it.
- Warning
- any fence currently associated with buffer will be replaced in favor of fence without waiting for the replaced fence to clear
-
The Mir client api assumes ownership of the fence fd.
- Parameters
-
[in] | buffer | The buffer |
[in] | fence | The fence that will be associated with buffer. If negative, this will remove the fence associated with this buffer. |
[in] | access | The ongoing access that is represented by fence. If mir_none is set, this will remove the fence protecting the buffer content. |
typedef int(* mir_buffer_get_fence) (MirBuffer *) |
Retrieve the native fence associated with this buffer.
- Warning
- Take care not to close the fd, the Mir client api retains ownership of the fence fd.
- Parameters
-
- Returns
- The fd representing the fence associated with buffer.
Wait for the fence associated with the buffer to signal.
After returning, it is permissible to access the buffer's content for the designated purpose in access.
- Parameters
-
[in] | buffer | The buffer |
[in] | access | The access to wait for. |
[in] | timeout | The amount of time to wait for the fence in nanoseconds, or -1 for infinite timeout. |
- Returns
- zero when fence was cleared successfully, or a negative number when the timeout was reached before the fence signals
Enumerator |
---|
mir_none |
|
mir_read |
|
mir_read_write |
|
Copyright © 2012-2021
Canonical Ltd.
Generated on Wed Aug 11 12:02:04 UTC 2021
This documentation is licensed under the GPL version 2 or 3.