17ec681f3Smrg/*
27ec681f3Smrg *  sync.h
37ec681f3Smrg *
47ec681f3Smrg *   Copyright 2012 Google, Inc
57ec681f3Smrg *
67ec681f3Smrg *  Licensed under the Apache License, Version 2.0 (the "License");
77ec681f3Smrg *  you may not use this file except in compliance with the License.
87ec681f3Smrg *  You may obtain a copy of the License at
97ec681f3Smrg *
107ec681f3Smrg *      http://www.apache.org/licenses/LICENSE-2.0
117ec681f3Smrg *
127ec681f3Smrg *  Unless required by applicable law or agreed to in writing, software
137ec681f3Smrg *  distributed under the License is distributed on an "AS IS" BASIS,
147ec681f3Smrg *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
157ec681f3Smrg *  See the License for the specific language governing permissions and
167ec681f3Smrg *  limitations under the License.
177ec681f3Smrg */
187ec681f3Smrg
197ec681f3Smrg#ifndef __SYS_CORE_SYNC_H
207ec681f3Smrg#define __SYS_CORE_SYNC_H
217ec681f3Smrg
227ec681f3Smrg/* This file contains the legacy sync interface used by Android platform and
237ec681f3Smrg * device code. The direct contents will be removed over time as code
247ec681f3Smrg * transitions to using the updated interface in ndk/sync.h. When this file is
257ec681f3Smrg * empty other than the ndk/sync.h include, that file will be renamed to
267ec681f3Smrg * replace this one.
277ec681f3Smrg *
287ec681f3Smrg * New code should continue to include this file (#include <android/sync.h>)
297ec681f3Smrg * instead of ndk/sync.h so the eventual rename is seamless, but should only
307ec681f3Smrg * use the things declared in ndk/sync.h.
317ec681f3Smrg *
327ec681f3Smrg * This file used to be called sync/sync.h, but we renamed to that both the
337ec681f3Smrg * platform and NDK call it android/sync.h. A symlink from the old name to this
347ec681f3Smrg * one exists temporarily to avoid having to change all sync clients
357ec681f3Smrg * simultaneously. It will be removed when they've been updated, and probably
367ec681f3Smrg * after this change has been delivered to AOSP so that integrations don't
377ec681f3Smrg * break builds.
387ec681f3Smrg */
397ec681f3Smrg
407ec681f3Smrg#include "../ndk/sync.h"
417ec681f3Smrg
427ec681f3Smrg__BEGIN_DECLS
437ec681f3Smrg
447ec681f3Smrg/* timeout in msecs */
457ec681f3Smrgint sync_wait(int fd, int timeout);
467ec681f3Smrg
477ec681f3Smrg__END_DECLS
487ec681f3Smrg
497ec681f3Smrg#endif /* __SYS_CORE_SYNC_H */
50