xshmfence.h revision ed6f5d66
1ed6f5d66Smrg/*
2ed6f5d66Smrg * Copyright © 2013 Keith Packard
3ed6f5d66Smrg *
4ed6f5d66Smrg * Permission to use, copy, modify, distribute, and sell this software and its
5ed6f5d66Smrg * documentation for any purpose is hereby granted without fee, provided that
6ed6f5d66Smrg * the above copyright notice appear in all copies and that both that copyright
7ed6f5d66Smrg * notice and this permission notice appear in supporting documentation, and
8ed6f5d66Smrg * that the name of the copyright holders not be used in advertising or
9ed6f5d66Smrg * publicity pertaining to distribution of the software without specific,
10ed6f5d66Smrg * written prior permission.  The copyright holders make no representations
11ed6f5d66Smrg * about the suitability of this software for any purpose.  It is provided "as
12ed6f5d66Smrg * is" without express or implied warranty.
13ed6f5d66Smrg *
14ed6f5d66Smrg * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15ed6f5d66Smrg * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16ed6f5d66Smrg * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17ed6f5d66Smrg * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18ed6f5d66Smrg * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19ed6f5d66Smrg * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
20ed6f5d66Smrg * OF THIS SOFTWARE.
21ed6f5d66Smrg */
22ed6f5d66Smrg
23ed6f5d66Smrg#ifndef _XSHMFENCE_H_
24ed6f5d66Smrg#define _XSHMFENCE_H_
25ed6f5d66Smrg
26ed6f5d66Smrg#include <X11/Xfuncproto.h>
27ed6f5d66Smrg
28ed6f5d66Smrg#define HAVE_STRUCT_XSHMFENCE   1
29ed6f5d66Smrg
30ed6f5d66Smrgstruct xshmfence;
31ed6f5d66Smrg
32ed6f5d66Smrg_X_EXPORT int
33ed6f5d66Smrgxshmfence_trigger(struct xshmfence *f);
34ed6f5d66Smrg
35ed6f5d66Smrg_X_EXPORT int
36ed6f5d66Smrgxshmfence_await(struct xshmfence *f);
37ed6f5d66Smrg
38ed6f5d66Smrg_X_EXPORT int
39ed6f5d66Smrgxshmfence_query(struct xshmfence *f);
40ed6f5d66Smrg
41ed6f5d66Smrg_X_EXPORT void
42ed6f5d66Smrgxshmfence_reset(struct xshmfence *f);
43ed6f5d66Smrg
44ed6f5d66Smrg_X_EXPORT int
45ed6f5d66Smrgxshmfence_alloc_shm(void);
46ed6f5d66Smrg
47ed6f5d66Smrg_X_EXPORT struct xshmfence *
48ed6f5d66Smrgxshmfence_map_shm(int fd);
49ed6f5d66Smrg
50ed6f5d66Smrg_X_EXPORT void
51ed6f5d66Smrgxshmfence_unmap_shm(struct xshmfence *f);
52ed6f5d66Smrg
53ed6f5d66Smrg#endif /* _XSHMFENCE_H_ */
54