diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-05-10 16:11:01 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-05-12 07:48:02 +0200 |
commit | c6212520abc119a4b49f7f513adb45c46ac3fc62 (patch) | |
tree | 001fe47bea3d02212ad38e23e961c7948f56d4d9 /rtemsbsd/rtems/program-internal.h | |
parent | tcpdump01: New test (diff) | |
download | rtems-libbsd-c6212520abc119a4b49f7f513adb45c46ac3fc62.tar.bz2 |
Add program destructor support
Update #4650.
Diffstat (limited to 'rtemsbsd/rtems/program-internal.h')
-rw-r--r-- | rtemsbsd/rtems/program-internal.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/rtemsbsd/rtems/program-internal.h b/rtemsbsd/rtems/program-internal.h index da817130..2104c064 100644 --- a/rtemsbsd/rtems/program-internal.h +++ b/rtemsbsd/rtems/program-internal.h @@ -60,6 +60,12 @@ struct program_allocmem_item { LIST_ENTRY(program_allocmem_item) entries; }; +struct program_destructor { + void (*destructor)(void *); + void *arg; + LIST_ENTRY(program_destructor) link; +}; + struct rtems_bsd_program_control { void *context; int exit_code; @@ -68,6 +74,7 @@ struct rtems_bsd_program_control { LIST_HEAD(, program_fd_item) open_fd; LIST_HEAD(, program_file_item) open_file; LIST_HEAD(, program_allocmem_item) allocated_mem; + LIST_HEAD(, program_destructor) destructors; }; struct rtems_bsd_program_control *rtems_bsd_program_get_control_or_null(void); |