⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 siglib.html

📁 vxworks相关论文
💻 HTML
📖 第 1 页 / 共 4 页
字号:
If the <i>pInfo</i> argument is non-NULL, the selected signal number isstored in the <b>si_signo</b> member, and the cause of the signal isstored in the <b>si_code</b> member.  If the signal is a queued signal,the value is stored in the <b>si_value</b> member of <i>pInfo</i>; otherwisethe content of <b>si_value</b> is undefined.<p>The following values are defined in <b>signal.h</b> for <b>si_code</b>:<dl><dt><b>SI_USER</b><dd>the signal was sent by the <b><i><a href="./sigLib.html#kill">kill</a></i>(&nbsp;)</b> function.<p><dt><b>SI_QUEUE</b><dd>the signal was sent by the <b><i><a href="./sigLib.html#sigqueue">sigqueue</a></i>(&nbsp;)</b> function.<p><dt><b>SI_TIMER</b><dd>the signal was generated by the expiration of a timer set by <b><i><a href="./timerLib.html#timer_settime">timer_settime</a></i>(&nbsp;)</b>.<p><dt><b>SI_ASYNCIO</b><dd>the signal was generated by the completion of an asynchronous I/O request.<p><dt><b>SI_MESGQ</b><dd> the signal was generated by the arrival of a message on an empty messagequeue. </dl><p>The function <b><i><a href="./sigLib.html#sigtimedwait">sigtimedwait</a></i>(&nbsp;)</b> provides a synchronous mechanism for tasksto wait for asynchromously generated signals.  A task should use<b><i><a href="./sigLib.html#sigprocmask">sigprocmask</a></i>(&nbsp;)</b> to block any signals it wants to handle synchronously andleave their signal handlers in the default state.  The task can thenmake repeated calls to <b><i><a href="./sigLib.html#sigtimedwait">sigtimedwait</a></i>(&nbsp;)</b> to remove any signals that aresent to it.<p></blockquote><h4>RETURNS</h4><blockquote><p>Upon successful completion (that is, one of the signals specifiedby <i>pSet</i> is pending or is generated) <b><i><a href="./sigLib.html#sigtimedwait">sigtimedwait</a></i>(&nbsp;)</b> will return the selectedsignal number.  Otherwise, a value of -1 is returned and <b>errno</b> is set toindicate the error.<p></blockquote><h4>ERRNO</h4><blockquote><p><dl><dt>EINTR<dd>The wait was interrupted by an unblocked, caught signal.<p><dt>EAGAIN<dd>No signal specified by <i>pSet</i> was delivered within the specified timeoutperiod.<p><dt>EINVAL<dd> The <i>pTimeout</i> argument specified a <b>tv_nsec</b> value less than zero or greaterthan or equal to 1000 million. </dl></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sigLib.html#top">sigLib</a></b><hr><a name="sigwaitinfo"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>sigwaitinfo</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>sigwaitinfo</i>(&nbsp;)</strong> - wait for real-time signals</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int sigwaitinfo    (    const sigset_t * pSet, /* the signal mask while suspended */    struct siginfo * pInfo /* return value */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>The function <b><i><a href="./sigLib.html#sigwaitinfo">sigwaitinfo</a></i>(&nbsp;)</b> is equivalent to calling <b><i><a href="./sigLib.html#sigtimedwait">sigtimedwait</a></i>(&nbsp;)</b> with<i>pTimeout</i> equal to NULL.  See that manual entry for more information.<p></blockquote><h4>RETURNS</h4><blockquote><p>Upon successful completion (that is, one of the signals specifiedby <i>pSet</i> is pending or is generated) <b><i><a href="./sigLib.html#sigwaitinfo">sigwaitinfo</a></i>(&nbsp;)</b> returns the selectedsignal number.  Otherwise, a value of -1 is returned and <b>errno</b> is set toindicate the error.<p></blockquote><h4>ERRNO</h4><blockquote><p><dl><dt>EINTR<dd> The wait was interrupted by an unblocked, caught signal. </dl></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sigLib.html#top">sigLib</a></b><hr><a name="sigvec"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>sigvec</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>sigvec</i>(&nbsp;)</strong> - install a signal handler</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int sigvec    (    int                   sig,  /* signal to attach handler to */    const struct sigvec * pVec, /* new handler information */    struct sigvec *       pOvec /* previous handler information */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine binds a signal handler routine referenced by <i>pVec</i> to aspecified signal <i>sig</i>.  It can also be used to determine which handler,if any, has been bound to a particular signal:  <b><i><a href="./sigLib.html#sigvec">sigvec</a></i>(&nbsp;)</b> copies currentsignal handler information for <i>sig</i> to <i>pOvec</i> and does not install asignal handler if <i>pVec</i> is set to NULL (0).<p>Both <i>pVec</i> and <i>pOvec</i> are pointers to a structure of type <b>structsigvec</b>.  The information passed includes not only the signal handlerroutine, but also the signal mask and additional option bits.  Thestructure <b>sigvec</b> and the available options are defined in <b>signal.h</b>.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK (0), or ERROR (-1) if the signal number is invalid or thesignal TCB cannot be allocated.<p></blockquote><h4>ERRNO</h4><blockquote><p>EINVAL, ENOMEM</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sigLib.html#top">sigLib</a></b><hr><a name="sigsetmask"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>sigsetmask</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>sigsetmask</i>(&nbsp;)</strong> - set the signal mask</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int sigsetmask    (    int mask /* new signal mask */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine sets the calling task's signal mask to a specified value.A one (1) in the bit mask indicates that the specified signal is blockedfrom delivery.  Use the macro SIGMASK to construct the mask for a specifiedsignal number.<p></blockquote><h4>RETURNS</h4><blockquote><p>The previous value of the signal mask.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sigLib.html#top">sigLib</a></b>, <b><i><a href="./sigLib.html#sigprocmask">sigprocmask</a></i>(&nbsp;)</b><hr><a name="sigblock"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>sigblock</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>sigblock</i>(&nbsp;)</strong> - add to a set of blocked signals</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int sigblock    (    int mask /* mask of additional signals to be blocked */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine adds the signals in <i>mask</i> to the task's set of blocked signals.A one (1) in the bit mask indicates that the specified signal is blockedfrom delivery.  Use the macro SIGMASK to construct the mask for a specifiedsignal number.<p></blockquote><h4>RETURNS</h4><blockquote><p>The previous value of the signal mask.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sigLib.html#top">sigLib</a></b>, <b><i><a href="./sigLib.html#sigprocmask">sigprocmask</a></i>(&nbsp;)</b><hr><a name="raise"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>raise</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>raise</i>(&nbsp;)</strong> - send a signal to the caller's task</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int raise    (    int signo /* signal to send to caller's task */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine sends the signal <i>signo</i> to the task invoking the call.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK (0), or ERROR (-1) if the signal number or task ID is invalid.<p></blockquote><h4>ERRNO</h4><blockquote><p>EINVAL</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sigLib.html#top">sigLib</a></b><hr><a name="kill"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>kill</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>kill</i>(&nbsp;)</strong> - send a signal to a task (POSIX)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int kill    (    int tid,  /* task to send signal to */    int signo /* signal to send to task */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine sends a signal <i>signo</i> to the task specified by <i>tid</i>.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK (0), or ERROR (-1) if the task ID or signal number is invalid.<p></blockquote><h4>ERRNO</h4><blockquote><p>EINVAL</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sigLib.html#top">sigLib</a></b><hr><a name="sigqueue"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>sigqueue</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>sigqueue</i>(&nbsp;)</strong> - send a queued signal to a task</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int sigqueue    (    int                tid,    int                signo,    const union sigval value    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>The function <b><i><a href="./sigLib.html#sigqueue">sigqueue</a></i>(&nbsp;)</b> sends the signal specified by <i>signo</i> withthe signal-parameter value specified by <i>value</i> to the processspecified by <i>tid</i>.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK (0), or ERROR (-1) if the task ID or signal number is invalid,or if there are no queued-signal buffers available.<p></blockquote><h4>ERRNO</h4><blockquote><p>EINVAL EAGAIN</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sigLib.html#top">sigLib</a></b></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -