source: trunk/src/emx/src/lib/process/sigwaitinfo.c@ 1614

Last change on this file since 1614 was 1614, checked in by bird, 21 years ago

Non-working signal code. (better having it in CVS than locally now)

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 2.0 KB
Line 
1/* $Id: sigwaitinfo.c 1614 2004-11-05 02:16:17Z bird $ */
2/** @file
3 *
4 * LIBC - sigwaitinfo().
5 *
6 * Copyright (c) 2004 knut st. osmundsen <[email protected]>
7 *
8 *
9 * This file is part of InnoTek LIBC.
10 *
11 * InnoTek LIBC is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License as published
13 * by the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * InnoTek LIBC is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License for more details.
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * along with InnoTek LIBC; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 *
25 */
26
27
28/*******************************************************************************
29* Header Files *
30*******************************************************************************/
31#include "libc-alias.h"
32#include <signal.h>
33#include <InnoTekLIBC/signals.h>
34#include <InnoTekLIBC/thread.h>
35#define __LIBC_LOG_GROUP __LIBC_LOG_GRP_SIGNAL
36#include <InnoTekLIBC/logstrict.h>
37
38
39
40/**
41 * Wait for a signal to become pending.
42 *
43 * @returns 0 on success.
44 * @returns -1 on failure, errno set.
45 * @param pSigSet Signals to wait for.
46 * @param pSigInfo Where to store the signal info for the signal
47 * that we accepted.
48 */
49int _STD(sigwaitinfo)(const sigset_t *pSigSet, siginfo_t *pSigInfo)
50{
51 LIBCLOG_ENTER("pSigSet=%p {%#08lx%#08lx} pSigInfo=%p\n",
52 (void *)pSigSet, pSigSet ? pSigSet->__bitmap[1] : 0, pSigSet ? pSigSet->__bitmap[0] : 0,
53 (void *)pSigInfo);
54 int rc;
55
56 /*
57 * Forward this call to sigtimedwait().
58 */
59 rc = sigtimedwait(pSigSet, pSigInfo, NULL);
60 LIBCLOG_RETURN_INT(rc);
61}
62
Note: See TracBrowser for help on using the repository browser.