blob: 1fc7e6f6e57c2a8762299c9b1476a7517638a80d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#ifndef LINUX_ONESHOT_SYNC_H
#define LINUX_ONESHOT_SYNC_H
#include <uapi/linux/oneshot_sync.h>
struct oneshot_sync_timeline;
struct sync_fence;
#ifdef CONFIG_ONESHOT_SYNC
struct oneshot_sync_timeline *oneshot_timeline_create(const char *name);
void oneshot_timeline_destroy(struct oneshot_sync_timeline *);
struct sync_fence *oneshot_fence_create(struct oneshot_sync_timeline *,
const char *name);
int oneshot_fence_signal(struct oneshot_sync_timeline *, struct sync_fence *);
#else
static inline struct oneshot_sync_timeline *
oneshot_timeline_create(const char *name)
{
return NULL;
}
void oneshot_timeline_destroy(struct oneshot_sync_timeline *timeline)
{
}
struct sync_fence *oneshot_fence_create(struct oneshot_sync_timeline *timeline,
const char *name)
{
return NULL;
}
int oneshot_fence_signal(struct oneshot_sync_timeline *timeline,
struct sync_fence *fence)
{
return -EINVAL;
}
#endif
#endif /* LINUX_ONESHOT_SYNC_H */
|