1*5688dfcfSmatt /* $NetBSD: compat_msync.c,v 1.2 2012/03/20 17:06:00 matt Exp $ */
25b84b398Schristos
35b84b398Schristos /*
45b84b398Schristos * Copyright (c) 1997 Frank van der Linden
55b84b398Schristos * All rights reserved.
65b84b398Schristos *
75b84b398Schristos * Redistribution and use in source and binary forms, with or without
85b84b398Schristos * modification, are permitted provided that the following conditions
95b84b398Schristos * are met:
105b84b398Schristos * 1. Redistributions of source code must retain the above copyright
115b84b398Schristos * notice, this list of conditions and the following disclaimer.
125b84b398Schristos * 2. Redistributions in binary form must reproduce the above copyright
135b84b398Schristos * notice, this list of conditions and the following disclaimer in the
145b84b398Schristos * documentation and/or other materials provided with the distribution.
155b84b398Schristos * 3. All advertising materials mentioning features or use of this software
165b84b398Schristos * must display the following acknowledgement:
175b84b398Schristos * This product includes software developed for the NetBSD Project
185b84b398Schristos * by Frank van der Linden
195b84b398Schristos * 4. The name of the author may not be used to endorse or promote products
205b84b398Schristos * derived from this software without specific prior written permission
215b84b398Schristos *
225b84b398Schristos * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
235b84b398Schristos * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
245b84b398Schristos * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
255b84b398Schristos * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
265b84b398Schristos * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
275b84b398Schristos * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
285b84b398Schristos * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
295b84b398Schristos * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
305b84b398Schristos * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
315b84b398Schristos * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
325b84b398Schristos */
335b84b398Schristos
345b84b398Schristos #include <sys/cdefs.h>
355b84b398Schristos #if defined(LIBC_SCCS) && !defined(lint)
36*5688dfcfSmatt __RCSID("$NetBSD: compat_msync.c,v 1.2 2012/03/20 17:06:00 matt Exp $");
375b84b398Schristos #endif /* LIBC_SCCS and not lint */
385b84b398Schristos
395b84b398Schristos #define __LIBC12_SOURCE__
405b84b398Schristos
415b84b398Schristos #include <sys/types.h>
425b84b398Schristos #include <sys/mman.h>
435b84b398Schristos #include <compat/sys/mman.h>
445b84b398Schristos
455b84b398Schristos __warn_references(msync,
465b84b398Schristos "warning: reference to compatibility msync(); include <sys/mman.h> for correct reference")
475b84b398Schristos
485b84b398Schristos int
msync(void * addr,size_t size)49*5688dfcfSmatt msync(void *addr, size_t size)
505b84b398Schristos {
515b84b398Schristos return __msync13(addr, size, MS_SYNC|MS_INVALIDATE);
525b84b398Schristos }
53