blob: 4ec6d4c2a01cc671359acd5fc126c1ea2ac09448 [file] [log] [blame]
Roman Stratiienko6a7ac122021-04-02 17:19:54 +03001// clang-format off
2/*
3 * sync.h
4 *
5 * Copyright 2012 Google, Inc
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 */
19
20#ifndef __SYS_CORE_SYNC_H
21#define __SYS_CORE_SYNC_H
22
23/* This file contains the legacy sync interface used by Android platform and
24 * device code. The direct contents will be removed over time as code
25 * transitions to using the updated interface in ndk/sync.h. When this file is
26 * empty other than the ndk/sync.h include, that file will be renamed to
27 * replace this one.
28 *
29 * New code should continue to include this file (#include <android/sync.h>)
30 * instead of ndk/sync.h so the eventual rename is seamless, but should only
31 * use the things declared in ndk/sync.h.
32 *
33 * This file used to be called sync/sync.h, but we renamed to that both the
34 * platform and NDK call it android/sync.h. A symlink from the old name to this
35 * one exists temporarily to avoid having to change all sync clients
36 * simultaneously. It will be removed when they've been updated, and probably
37 * after this change has been delivered to AOSP so that integrations don't
38 * break builds.
39 */
40
41#include "../ndk/sync.h"
42
43__BEGIN_DECLS
44
45/* timeout in msecs */
46int sync_wait(int fd, int timeout);
47
48__END_DECLS
49
50#endif /* __SYS_CORE_SYNC_H */