Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion include/nuttx/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@
#define GROUP_FLAG_PRIVILEGED (1 << 1) /* Bit 1: Group is privileged */
#define GROUP_FLAG_DELETED (1 << 2) /* Bit 2: Group has been deleted but not yet freed */
#define GROUP_FLAG_EXITING (1 << 3) /* Bit 3: Group exit is in progress */
/* Bits 3-7: Available */
#define GROUP_FLAG_STATIC (1 << 4) /* Bit 4: Group is statically allocated */
/* Bits 5-7: Available */

/* Values for struct child_status_s ch_flags */

Expand Down
1 change: 1 addition & 0 deletions sched/group/group_create.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ int group_allocate(FAR struct tcb_s *tcb, uint8_t ttype)
{
group = &g_kthread_group;
tcb->group = group;
group->tg_flags |= GROUP_FLAG_STATIC;
if (group->tg_info)
{
return OK;
Expand Down
3 changes: 2 additions & 1 deletion sched/group/group_leave.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,8 @@ void group_drop(FAR struct task_group_s *group)

/* Finally, if no one needs the group and it has been deleted, remove it */

if (group->tg_flags & GROUP_FLAG_DELETED)
if ((group->tg_flags & GROUP_FLAG_DELETED) &&
!(group->tg_flags & GROUP_FLAG_STATIC))
{
/* Release the group container itself */

Expand Down
Loading