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