2 * drivers/base/sw_sync.c
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 #include <linux/kernel.h>
18 #include <linux/init.h>
19 #include <linux/export.h>
20 #include <linux/file.h>
22 #include <linux/miscdevice.h>
23 #include <linux/syscalls.h>
24 #include <linux/uaccess.h>
28 struct fence *sw_sync_pt_create(struct sw_sync_timeline *obj, u32 value)
30 struct sw_sync_pt *pt;
32 pt = (struct sw_sync_pt *)
33 sync_pt_create(&obj->obj, sizeof(struct sw_sync_pt), value);
37 return (struct fence *)pt;
39 EXPORT_SYMBOL(sw_sync_pt_create);
41 struct sw_sync_timeline *sw_sync_timeline_create(const char *name)
43 struct sw_sync_timeline *obj = (struct sw_sync_timeline *)
44 sync_timeline_create(sizeof(struct sw_sync_timeline),
49 EXPORT_SYMBOL(sw_sync_timeline_create);
51 void sw_sync_timeline_inc(struct sw_sync_timeline *obj, u32 inc)
53 sync_timeline_signal(&obj->obj, inc);
55 EXPORT_SYMBOL(sw_sync_timeline_inc);