mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 03:45:50 +08:00
signals: Basic framework to support SIGEV_THREAD
This commit is contained in:
+14
-20
@@ -51,29 +51,10 @@
|
||||
|
||||
#ifdef CONFIG_FS_AIO
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Types
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: aio_signal
|
||||
*
|
||||
@@ -126,6 +107,19 @@ int aio_signal(pid_t pid, FAR struct aiocb *aiocbp)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SIG_EVTHREAD
|
||||
/* Notify the client via a function call */
|
||||
|
||||
else if (aiocbp->aio_sigevent.sigev_notify == SIGEV_THREAD)
|
||||
{
|
||||
ret = sig_notification(pid, &aiocbp->aio_sigevent);
|
||||
if (ret < 0)
|
||||
{
|
||||
fdbg("ERROR: sig_notification failed: %d\n", ret);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Send the poll signal in any event in case the caller is waiting
|
||||
* on sig_suspend();
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user