mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 12:08:36 +08:00
Minor simplication to last commit; Update TODO list
This commit is contained in:
parent
52fbbaf778
commit
7d9287958f
3 changed files with 12 additions and 29 deletions
13
TODO
13
TODO
|
@ -11,7 +11,7 @@ nuttx/
|
|||
|
||||
(13) Task/Scheduler (sched/)
|
||||
(1) Memory Management (mm/)
|
||||
(4) Signals (sched/signal, arch/)
|
||||
(3) Signals (sched/signal, arch/)
|
||||
(2) pthreads (sched/pthread)
|
||||
(0) Message Queues (sched/mqueue)
|
||||
(6) Kernel/Protected Build
|
||||
|
@ -360,17 +360,6 @@ o Signals (sched/signal, arch/)
|
|||
Status: Open
|
||||
Priority: Low. Even if there are only 31 usable signals, that is still a lot.
|
||||
|
||||
Title: THREAD COMMON SIGNAL HANDLING
|
||||
Description: Signal handlers are assigned on a per thread basis. Signal lists
|
||||
and data structures are a part of the TCB. This is incorrect.
|
||||
Signal handlers are a global property of the task group: The
|
||||
main thread and all of its child threads. Signal handlers for
|
||||
all threads should be attach-able from the main thread, for
|
||||
example.
|
||||
Status: Open
|
||||
Priority: Medium. This is a pretty big violation of the signal handling
|
||||
principles.
|
||||
|
||||
o pthreads (sched/pthreads)
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
|
|
@ -89,12 +89,11 @@ struct group_signal_s
|
|||
static int group_signal_handler(pid_t pid, FAR void *arg)
|
||||
{
|
||||
FAR struct group_signal_s *info = (FAR struct group_signal_s *)arg;
|
||||
FAR struct task_group_s *group;
|
||||
FAR struct tcb_s *tcb;
|
||||
FAR sigactq_t *sigact;
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT(info);
|
||||
DEBUGASSERT(tcb != NULL && tcb->group != NULL && info != NULL);
|
||||
|
||||
/* Get the TCB associated with the group member */
|
||||
|
||||
|
@ -154,10 +153,7 @@ static int group_signal_handler(pid_t pid, FAR void *arg)
|
|||
|
||||
/* Is there also a action associated with the task group? */
|
||||
|
||||
group = tcb->group;
|
||||
DEBUGASSERT(group != NULL);
|
||||
|
||||
sigact = sig_findaction(group, info->siginfo->si_signo);
|
||||
sigact = sig_findaction(tcb->group, info->siginfo->si_signo);
|
||||
if (sigact)
|
||||
{
|
||||
/* Yes.. then use this thread. The requirement is this:
|
||||
|
|
|
@ -72,20 +72,17 @@
|
|||
|
||||
static int sig_queueaction(FAR struct tcb_s *stcb, siginfo_t *info)
|
||||
{
|
||||
FAR struct task_group_s *group;
|
||||
FAR sigactq_t *sigact;
|
||||
FAR sigq_t *sigq;
|
||||
irqstate_t flags;
|
||||
int ret = OK;
|
||||
|
||||
sched_lock();
|
||||
DEBUGASSERT(stcb != NULL && stcb->group != NULL);
|
||||
|
||||
/* Find the group sigaction associated with this signal */
|
||||
|
||||
DEBUGASSERT(stcb != NULL && stcb->group != NULL);
|
||||
|
||||
group = stcb->group;
|
||||
sigact = sig_findaction(group, info->si_signo);
|
||||
sigact = sig_findaction(stcb->group, info->si_signo);
|
||||
|
||||
/* Check if a valid signal handler is available and if the signal is
|
||||
* unblocked. NOTE: There is no default action.
|
||||
|
@ -202,7 +199,7 @@ static FAR sigpendq_t *sig_findpendingsignal(FAR struct task_group_s *group,
|
|||
FAR sigpendq_t *sigpend = NULL;
|
||||
irqstate_t flags;
|
||||
|
||||
DEBUGASSERT(group);
|
||||
DEBUGASSERT(group != NULL);
|
||||
|
||||
/* Pending sigals can be added from interrupt level. */
|
||||
|
||||
|
@ -232,13 +229,14 @@ static FAR sigpendq_t *sig_findpendingsignal(FAR struct task_group_s *group,
|
|||
static FAR sigpendq_t *sig_addpendingsignal(FAR struct tcb_s *stcb,
|
||||
FAR siginfo_t *info)
|
||||
{
|
||||
FAR struct task_group_s *group = stcb->group;
|
||||
FAR struct task_group_s *group;
|
||||
FAR sigpendq_t *sigpend;
|
||||
irqstate_t flags;
|
||||
|
||||
DEBUGASSERT(group);
|
||||
DEBUGASSERT(stcb != NULL && stcb->group != NULL);
|
||||
group = stcb->group;
|
||||
|
||||
/* Check if the signal is already pending */
|
||||
/* Check if the signal is already pending for the group */
|
||||
|
||||
sigpend = sig_findpendingsignal(group, info->si_signo);
|
||||
if (sigpend)
|
||||
|
@ -248,7 +246,7 @@ static FAR sigpendq_t *sig_addpendingsignal(FAR struct tcb_s *stcb,
|
|||
memcpy(&sigpend->info, info, sizeof(siginfo_t));
|
||||
}
|
||||
|
||||
/* No... There is nothing pending for this signo */
|
||||
/* No... There is nothing pending in the group for this signo */
|
||||
|
||||
else
|
||||
{
|
||||
|
@ -261,7 +259,7 @@ static FAR sigpendq_t *sig_addpendingsignal(FAR struct tcb_s *stcb,
|
|||
|
||||
memcpy(&sigpend->info, info, sizeof(siginfo_t));
|
||||
|
||||
/* Add the structure to the pending signal list */
|
||||
/* Add the structure to the group pending signal list */
|
||||
|
||||
flags = enter_critical_section();
|
||||
sq_addlast((FAR sq_entry_t *)sigpend, &group->tg_sigpendingq);
|
||||
|
|
Loading…
Reference in a new issue