aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sync_file.h
diff options
context:
space:
mode:
authorGustavo Padovan <gustavo.padovan@collabora.co.uk>2016-04-28 09:46:57 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-04-29 20:37:10 -0400
commit460bfc41fd52959311ed0328163f785e023857af (patch)
tree314551febc87c2a8d4fadfd1e49e3ef4ab3add7e /include/linux/sync_file.h
parent92e06213f11a87effad8bdd4d910958b89eec044 (diff)
dma-buf/sync_file: de-stage sync_file headers
Move sync_file headers file to include/ dir. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/sync_file.h')
-rw-r--r--include/linux/sync_file.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/include/linux/sync_file.h b/include/linux/sync_file.h
new file mode 100644
index 000000000000..c6ffe8b0725c
--- /dev/null
+++ b/include/linux/sync_file.h
@@ -0,0 +1,57 @@
1/*
2 * include/linux/sync_file.h
3 *
4 * Copyright (C) 2012 Google, Inc.
5 *
6 * This program is distributed in the hope that it will be useful,
7 * but WITHOUT ANY WARRANTY; without even the implied warranty of
8 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 * GNU General Public License for more details.
10 *
11 */
12
13#ifndef _LINUX_SYNC_FILE_H
14#define _LINUX_SYNC_FILE_H
15
16#include <linux/types.h>
17#include <linux/kref.h>
18#include <linux/ktime.h>
19#include <linux/list.h>
20#include <linux/spinlock.h>
21#include <linux/fence.h>
22
23struct sync_file_cb {
24 struct fence_cb cb;
25 struct fence *fence;
26 struct sync_file *sync_file;
27};
28
29/**
30 * struct sync_file - sync file to export to the userspace
31 * @file: file representing this fence
32 * @kref: reference count on fence.
33 * @name: name of sync_file. Useful for debugging
34 * @sync_file_list: membership in global file list
35 * @num_fences: number of sync_pts in the fence
36 * @wq: wait queue for fence signaling
37 * @status: 0: signaled, >0:active, <0: error
38 * @cbs: sync_pts callback information
39 */
40struct sync_file {
41 struct file *file;
42 struct kref kref;
43 char name[32];
44#ifdef CONFIG_DEBUG_FS
45 struct list_head sync_file_list;
46#endif
47 int num_fences;
48
49 wait_queue_head_t wq;
50 atomic_t status;
51
52 struct sync_file_cb cbs[];
53};
54
55struct sync_file *sync_file_create(struct fence *fence);
56
57#endif /* _LINUX_SYNC_H */