gfxstream: use util/libsync

Gets rid of some #ifdefs.

Acked-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31548>
This commit is contained in:
Gurchetan Singh
2024-10-03 13:41:40 -07:00
committed by Marge Bot
parent 34e0394580
commit 02b383fded
@@ -2,25 +2,19 @@
* Copyright 2023 Google
* SPDX-License-Identifier: MIT
*/
#include "LinuxSync.h"
#if defined(__ANDROID__)
#include <sync/sync.h>
#endif
#include <unistd.h>
#include "util/libsync.h"
namespace gfxstream {
LinuxSyncHelper::LinuxSyncHelper() {}
int LinuxSyncHelper::wait(int syncFd, int timeoutMilliseconds) {
#if defined(__ANDROID__)
return sync_wait(syncFd, timeoutMilliseconds);
#else
(void)syncFd;
(void)timeoutMilliseconds;
return -1;
#endif
}
int LinuxSyncHelper::dup(int syncFd) { return ::dup(syncFd); }