mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 23:03:27 +08:00
binfmt/ and sched/group: Re-architect the way that loadable ELF or NXFLAT modules are unloaded. Memory resources must be recovered when the task loaded into memory exits. The originmal implementatino used the death-of-child SIGCHLD signal to perform the unload. There are several problems with this: It is overly complex, it requires that the parent task stay resident while the loaded task runs, and it has fatal logic flaws in the protected and kernel model builds because the user signal handler attempts to run in the kernel address space. This commit corrects with using a mindlessly simply BINFMT callback when the task exits.
This commit is contained in:
+4
-3
@@ -1,7 +1,8 @@
|
||||
############################################################################
|
||||
# nxflat/Makefile
|
||||
#
|
||||
# Copyright (C) 2007-2009, 2012-2016 Gregory Nutt. All rights reserved.
|
||||
# Copyright (C) 2007-2009, 2012-2016, 2018 Gregory Nutt. All rights
|
||||
# reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@@ -52,8 +53,8 @@ ifeq ($(CONFIG_BINFMT_EXEPATH),y)
|
||||
BINFMT_CSRCS += binfmt_exepath.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_SCHED_HAVE_PARENT),y)
|
||||
BINFMT_CSRCS += binfmt_schedunload.c
|
||||
ifeq ($(CONFIG_BINFMT_LOADABLE),y)
|
||||
BINFMT_CSRCS += binfmt_exit.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_LIBC_EXECFUNCS),y)
|
||||
|
||||
Reference in New Issue
Block a user