4 #include <tbm_bufmgr.h>
11 * @brief Create timeline object.
12 * @return file descriptor for the created timeline on success, -1 otherwise
13 * @remarks close the fd when you no longer need it
15 tbm_fd tbm_sync_timeline_create(void);
18 * @brief Increase the current value of the timeline.
19 * @param[in] timeline timeline object
20 * @param[in] count amount of increment
21 * @return 1 on success, 0 otherwise
23 int tbm_sync_timeline_inc(tbm_fd timeline, unsigned int count);
26 * @brief Create fence object.
27 * @param[in] timeline timeline object on which the fence is created
28 * @param[in] name fence name (only first 31 characters will be used)
29 * @param[in] value timeline point value for the fence
30 * @return file descriptor for the created fence on success, -1 otherwise
31 * @remarks close the fd when you no longer need it
33 tbm_fd tbm_sync_fence_create(tbm_fd timeline, const char *name, unsigned int value);
36 * @brief Wait for the given fence to be signaled
37 * @param[in] fence fence object
38 * @param[in] timeout timeout in milliseconds
39 * @return 1 on success, 0 on failure, -1 on timeout expire
40 * @remarks negative timeout means infinite, timeout 0 returns immediately
42 int tbm_sync_fence_wait(tbm_fd fence, int timeout);
45 * @brief Merge two fences into one
46 * @param[in] name name of the new fence
47 * @param[in] fence1 fence to be merged
48 * @param[in] fence2 fence to be merged
49 * @return file descriptor for the new fence on success, -1 otherwise
50 * @remarks close the fd when you no longer need it
52 tbm_fd tbm_sync_fence_merge(const char *name, tbm_fd fence1, tbm_fd fence2);
58 #endif /* _TBM_SYNC_H */