2 * include/linux/sw_sync.h
4 * Copyright (C) 2012 Google, Inc.
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
17 #ifndef _LINUX_SW_SYNC_H
18 #define _LINUX_SW_SYNC_H
20 #include <linux/types.h>
24 #include <linux/sync.h>
26 struct sw_sync_timeline
{
27 struct sync_timeline obj
;
38 struct sw_sync_timeline
*sw_sync_timeline_create(const char *name
);
39 void sw_sync_timeline_inc(struct sw_sync_timeline
*obj
, u32 inc
);
41 struct sync_pt
*sw_sync_pt_create(struct sw_sync_timeline
*obj
, u32 value
);
43 #endif /* __KERNEL __ */
45 struct sw_sync_create_fence_data
{
48 __s32 fence
; /* fd of new fence */
51 #define SW_SYNC_IOC_MAGIC 'W'
53 #define SW_SYNC_IOC_CREATE_FENCE _IOWR(SW_SYNC_IOC_MAGIC, 0,\
54 struct sw_sync_create_fence_data)
55 #define SW_SYNC_IOC_INC _IOW(SW_SYNC_IOC_MAGIC, 1, __u32)
58 #endif /* _LINUX_SW_SYNC_H */