3 Copyright 1991, 1993, 1994, 1998 The Open Group
5 Permission to use, copy, modify, distribute, and sell this software and its
6 documentation for any purpose is hereby granted without fee, provided that
7 the above copyright notice appear in all copies and that both that
8 copyright notice and this permission notice appear in supporting
11 The above copyright notice and this permission notice shall be included in
12 all copies or substantial portions of the Software.
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 Except as contained in this notice, the name of The Open Group shall not be
22 used in advertising or otherwise to promote the sale, use or other dealings
23 in this Software without prior written authorization from The Open Group.
27 /***********************************************************
28 Copyright 1991,1993 by Digital Equipment Corporation, Maynard, Massachusetts,
29 and Olivetti Research Limited, Cambridge, England.
33 Permission to use, copy, modify, and distribute this software and its
34 documentation for any purpose and without fee is hereby granted,
35 provided that the above copyright notice appear in all copies and that
36 both that copyright notice and this permission notice appear in
37 supporting documentation, and that the names of Digital or Olivetti
38 not be used in advertising or publicity pertaining to distribution of the
39 software without specific, written prior permission.
41 DIGITAL AND OLIVETTI DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
42 SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
43 FITNESS, IN NO EVENT SHALL THEY BE LIABLE FOR ANY SPECIAL, INDIRECT OR
44 CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
45 USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
46 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
47 PERFORMANCE OF THIS SOFTWARE.
49 ******************************************************************/
56 #include "misyncstr.h"
59 * The System Counter interface
63 XSyncCounterNeverChanges
,
64 XSyncCounterNeverIncreases
,
65 XSyncCounterNeverDecreases
,
66 XSyncCounterUnrestricted
69 typedef void (*SyncSystemCounterQueryValue
)(pointer counter
,
72 typedef void (*SyncSystemCounterBracketValues
)(pointer counter
,
73 CARD64
*pbracket_less
,
74 CARD64
*pbracket_greater
77 typedef struct _SysCounterInfo
{
78 SyncCounter
*pCounter
;
81 CARD64 bracket_greater
;
83 SyncCounterType counterType
; /* how can this counter change */
84 SyncSystemCounterQueryValue QueryValue
;
85 SyncSystemCounterBracketValues BracketValues
;
87 struct xorg_list entry
;
90 typedef struct _SyncAlarmClientList
{
93 struct _SyncAlarmClientList
*next
;
94 } SyncAlarmClientList
;
96 typedef struct _SyncAlarm
{
103 SyncAlarmClientList
*pEventClients
;
109 int num_waitconditions
;
114 CARD64 event_threshold
;
115 SyncAwaitHeader
*pHeader
;
119 SyncAwaitHeader header
;
123 extern SyncCounter
* SyncCreateSystemCounter(const char *name
,
124 CARD64 initial_value
,
126 SyncCounterType counterType
,
127 SyncSystemCounterQueryValue QueryValue
,
128 SyncSystemCounterBracketValues BracketValues
131 extern void SyncChangeCounter(SyncCounter
*pCounter
,
135 extern void SyncDestroySystemCounter(pointer pCounter
);
137 extern SyncCounter
*SyncInitDeviceIdleTime(DeviceIntPtr dev
);
138 extern void SyncRemoveDeviceIdleTime(SyncCounter
*counter
);
141 SyncCreateFenceFromFD(ClientPtr client
, DrawablePtr pDraw
, XID id
, int fd
, BOOL initially_triggered
);
144 SyncFDFromFence(ClientPtr client
, DrawablePtr pDraw
, SyncFence
*fence
);
147 SyncDeleteTriggerFromSyncObject(SyncTrigger
* pTrigger
);
150 SyncAddTriggerToSyncObject(SyncTrigger
* pTrigger
);
152 #endif /* _SYNCSRV_H_ */