4 #include <tbm_bufmgr.h>
7 * @brief Create timeline object.
8 * @return file descriptor for the created timeline on success, -1 otherwise
9 * @remarks close the fd when you no longer need it
11 tbm_fd tbm_sync_timeline_create(void);
14 * @brief Increase the current value of the timeline.
15 * @param[in] timeline timeline object
16 * @param[in] count amount of increment
17 * @return 1 on success, 0 otherwise
19 int tbm_sync_timeline_inc(tbm_fd timeline, unsigned int count);
22 * @brief Create fence object.
23 * @param[in] timeline timeline object on which the fence is created
24 * @param[in] name fence name (only first 31 characters will be used)
25 * @param[in] value timeline point value for the fence
26 * @return file descriptor for the created fence on success, -1 otherwise
27 * @remarks close the fd when you no longer need it
29 tbm_fd tbm_sync_fence_create(tbm_fd timeline, const char *name, unsigned int value);
32 * @brief Wait for the given fence to be signaled
33 * @param[in] fence fence object
34 * @param[in] timeout timeout in milliseconds
35 * @return 1 on success, 0 on failure, -1 on timeout expire
36 * @remarks negative timeout means infinite, timeout 0 returns immediately
38 int tbm_sync_fence_wait(tbm_fd fence, int timeout);
41 * @brief Merge two fences into one
42 * @param[in] name name of the new fence
43 * @param[in] fence1 fence to be merged
44 * @param[in] fence2 fence to be merged
45 * @return file descriptor for the new fence on success, -1 otherwise
46 * @remarks close the fd when you no longer need it
48 tbm_fd tbm_sync_fence_merge(const char *name, tbm_fd fence1, tbm_fd fence2);
50 #endif /* _TBM_SYNC_H */