sigwaitinfo.c revision 1.1
11.1Sjdolecek/* $NetBSD: sigwaitinfo.c,v 1.1 2003/02/15 21:11:49 jdolecek 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 * 3. All advertising materials mentioning features or use of this software 191.1Sjdolecek * must display the following acknowledgement: 201.1Sjdolecek * This product includes software developed by the NetBSD 211.1Sjdolecek * Foundation, Inc. and its contributors. 221.1Sjdolecek * 4. Neither the name of The NetBSD Foundation nor the names of its 231.1Sjdolecek * contributors may be used to endorse or promote products derived 241.1Sjdolecek * from this software without specific prior written permission. 251.1Sjdolecek * 261.1Sjdolecek * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 271.1Sjdolecek * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 281.1Sjdolecek * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 291.1Sjdolecek * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 301.1Sjdolecek * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 311.1Sjdolecek * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 321.1Sjdolecek * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 331.1Sjdolecek * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 341.1Sjdolecek * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 351.1Sjdolecek * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 361.1Sjdolecek * POSSIBILITY OF SUCH DAMAGE. 371.1Sjdolecek */ 381.1Sjdolecek 391.1Sjdolecek#include <sys/cdefs.h> 401.1Sjdolecek#if defined(LIBC_SCCS) && !defined(lint) 411.1Sjdolecek__RCSID("$NetBSD: sigwaitinfo.c,v 1.1 2003/02/15 21:11:49 jdolecek Exp $"); 421.1Sjdolecek#endif /* LIBC_SCCS and not lint */ 431.1Sjdolecek 441.1Sjdolecek#include "namespace.h" 451.1Sjdolecek#include <sys/types.h> 461.1Sjdolecek#include <sys/syscall.h> 471.1Sjdolecek#include <unistd.h> 481.1Sjdolecek#include <signal.h> 491.1Sjdolecek 501.1Sjdolecek#ifdef __weak_alias 511.1Sjdolecek__weak_alias(sigwaitinfo,_sigwaitinfo) 521.1Sjdolecek#endif 531.1Sjdolecek 541.1Sjdolecekint _sigwaitinfo __P((const sigset_t * __restrict, 551.1Sjdolecek siginfo_t * __restrict info)); 561.1Sjdolecek 571.1Sjdolecek/* 581.1Sjdolecek * This is wrapper around sigtimedwait(2), providing sigwaitinfo() 591.1Sjdolecek * implementation for userland. 601.1Sjdolecek */ 611.1Sjdolecekint 621.1Sjdolecek_sigwaitinfo(const sigset_t * __restrict set, siginfo_t * __restrict info) 631.1Sjdolecek{ 641.1Sjdolecek return (sigtimedwait(set, info, NULL)); 651.1Sjdolecek} 66