f78b12e570284aa8291f4ca1add24937fd107403vboxsync/*
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Copyright © 2010 NVIDIA Corporation
f78b12e570284aa8291f4ca1add24937fd107403vboxsync *
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Permission is hereby granted, free of charge, to any person obtaining a
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * copy of this software and associated documentation files (the "Software"),
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * to deal in the Software without restriction, including without limitation
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * the rights to use, copy, modify, merge, publish, distribute, sublicense,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * and/or sell copies of the Software, and to permit persons to whom the
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Software is furnished to do so, subject to the following conditions:
f78b12e570284aa8291f4ca1add24937fd107403vboxsync *
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * The above copyright notice and this permission notice (including the next
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * paragraph) shall be included in all copies or substantial portions of the
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Software.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync *
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * DEALINGS IN THE SOFTWARE.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#ifndef _SYNCSDK_H_
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define _SYNCSDK_H_
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#include "misync.h"
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern _X_EXPORT int
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncSyncVerifyFence(SyncFence **ppFence, XID fid, ClientPtr client, Mask mode);
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define VERIFY_SYNC_FENCE(pFence, fid, client, mode) \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync do { \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int rc; \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync rc = SyncVerifyFence(&(pFence), (fid), (client), (mode)); \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync if (Success != rc) return rc; \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync } while (0)
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define VERIFY_SYNC_FENCE_OR_NONE(pFence, fid, client, mode) \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync do { \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync pFence = 0; \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync if (None != fid) \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync VERIFY_SYNC_FENCE((pFence), (fid), (client), (mode)); \
f78b12e570284aa8291f4ca1add24937fd107403vboxsync } while (0)
f78b12e570284aa8291f4ca1add24937fd107403vboxsync
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#endif /* _SYNCSDK_H_ */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync