1169691Skan/* $NetBSD: sigwaitinfo.c,v 1.1 2003/02/15 21:11:49 jdolecek Exp $ */
2169691Skan
3169691Skan/*-
4169691Skan * Copyright (c) 2003 The NetBSD Foundation, Inc.
5169691Skan * All rights reserved.
6169691Skan *
7169691Skan * This code is derived from software contributed to The NetBSD Foundation
8169691Skan * by Jaromir Dolecek.
9169691Skan *
10169691Skan * Redistribution and use in source and binary forms, with or without
11169691Skan * modification, are permitted provided that the following conditions
12169691Skan * are met:
13169691Skan * 1. Redistributions of source code must retain the above copyright
14169691Skan *    notice, this list of conditions and the following disclaimer.
15169691Skan * 2. Redistributions in binary form must reproduce the above copyright
16169691Skan *    notice, this list of conditions and the following disclaimer in the
17169691Skan *    documentation and/or other materials provided with the distribution.
18169691Skan *
19169691Skan * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20169691Skan * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21169691Skan * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22169691Skan * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23169691Skan * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24169691Skan * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25169691Skan * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26169691Skan * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27169691Skan * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28169691Skan * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29169691Skan * POSSIBILITY OF SUCH DAMAGE.
30169691Skan */
31169691Skan
32169691Skan#include <sys/cdefs.h>
33169691Skan#if defined(LIBC_SCCS) && !defined(lint)
34169691Skan__RCSID("$NetBSD: sigwaitinfo.c,v 1.1 2003/02/15 21:11:49 jdolecek Exp $");
35169691Skan#endif /* LIBC_SCCS and not lint */
36169691Skan
37169691Skan#include "namespace.h"
38169691Skan#include <sys/types.h>
39169691Skan#include <sys/syscall.h>
40169691Skan#include <unistd.h>
41169691Skan#include <signal.h>
42169691Skan
43169691Skan#ifdef __weak_alias
44169691Skan__weak_alias(sigwaitinfo,_sigwaitinfo)
45169691Skan#endif
46169691Skan
47169691Skanint	_sigwaitinfo __P((const sigset_t * __restrict,
48169691Skan	    siginfo_t * __restrict info));
49169691Skan
50169691Skan/*
51169691Skan * This is wrapper around sigtimedwait(2), providing sigwaitinfo()
52169691Skan * implementation for userland.
53169691Skan */
54169691Skanint
55169691Skan_sigwaitinfo(const sigset_t * __restrict set, siginfo_t * __restrict info)
56169691Skan{
57169691Skan	return (sigtimedwait(set, info, NULL));
58169691Skan}
59169691Skan