signals: Basic framework to support SIGEV_THREAD

This commit is contained in:
Gregory Nutt
2015-12-30 13:20:31 -06:00
parent e76e8f41c6
commit 9835eeb181
15 changed files with 252 additions and 84 deletions
+14 -20
View File
@@ -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();
*/