11.3Smatt/* $NetBSD: sigwaitinfo.c,v 1.3 2012/03/20 16:26:12 matt Exp $ */ 21.1Sjdolecek 31.1Sjdolecek/*- 41.1Sjdolecek * Copyright (c) 2003 The NetBSD Foundation, Inc. 51.1Sjdolecek * All rights reserved. 61.1Sjdolecek * 71.1Sjdolecek * This code is derived from software contributed to The NetBSD Foundation 81.1Sjdolecek * by Jaromir Dolecek. 91.1Sjdolecek * 101.1Sjdolecek * Redistribution and use in source and binary forms, with or without 111.1Sjdolecek * modification, are permitted provided that the following conditions 121.1Sjdolecek * are met: 131.1Sjdolecek * 1. Redistributions of source code must retain the above copyright 141.1Sjdolecek * notice, this list of conditions and the following disclaimer. 151.1Sjdolecek * 2. Redistributions in binary form must reproduce the above copyright 161.1Sjdolecek * notice, this list of conditions and the following disclaimer in the 171.1Sjdolecek * documentation and/or other materials provided with the distribution. 181.1Sjdolecek * 191.1Sjdolecek * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 201.1Sjdolecek * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 211.1Sjdolecek * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 221.1Sjdolecek * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 231.1Sjdolecek * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 241.1Sjdolecek * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 251.1Sjdolecek * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 261.1Sjdolecek * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 271.1Sjdolecek * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 281.1Sjdolecek * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 291.1Sjdolecek * POSSIBILITY OF SUCH DAMAGE. 301.1Sjdolecek */ 311.1Sjdolecek 321.1Sjdolecek#include <sys/cdefs.h> 331.1Sjdolecek#if defined(LIBC_SCCS) && !defined(lint) 341.3Smatt__RCSID("$NetBSD: sigwaitinfo.c,v 1.3 2012/03/20 16:26:12 matt Exp $"); 351.1Sjdolecek#endif /* LIBC_SCCS and not lint */ 361.1Sjdolecek 371.1Sjdolecek#include "namespace.h" 381.1Sjdolecek#include <sys/types.h> 391.1Sjdolecek#include <sys/syscall.h> 401.1Sjdolecek#include <unistd.h> 411.1Sjdolecek#include <signal.h> 421.1Sjdolecek 431.1Sjdolecek#ifdef __weak_alias 441.1Sjdolecek__weak_alias(sigwaitinfo,_sigwaitinfo) 451.1Sjdolecek#endif 461.1Sjdolecek 471.3Smattint _sigwaitinfo(const sigset_t * __restrict, siginfo_t * __restrict info); 481.1Sjdolecek 491.1Sjdolecek/* 501.1Sjdolecek * This is wrapper around sigtimedwait(2), providing sigwaitinfo() 511.1Sjdolecek * implementation for userland. 521.1Sjdolecek */ 531.1Sjdolecekint 541.1Sjdolecek_sigwaitinfo(const sigset_t * __restrict set, siginfo_t * __restrict info) 551.1Sjdolecek{ 561.1Sjdolecek return (sigtimedwait(set, info, NULL)); 571.1Sjdolecek} 58