libroot: Introduce thread specific heap init/exit hooks.

This allows heap implementations to initialize and clean up any thread
specific structures. The current default hoard heap does not use these.

Note that the thread exit hook will not be called for the main thread as
the heap may be needed during process termination (__cxa_finalize for
example).

Change-Id: I703fbd34dec0d9029d619a2125c5b19d8c1933aa
Reviewed-on: https://review.haiku-os.org/799
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
Michael Lotz
2018-12-25 23:00:20 +00:00
committed by waddlesplash
parent 20e0f7607c
commit e4103b1b92
6 changed files with 35 additions and 2 deletions
@@ -39,6 +39,8 @@ void __heap_terminate_after(void);
void __heap_before_fork(void);
void __heap_after_fork_child(void);
void __heap_after_fork_parent(void);
void __heap_thread_init(void);
void __heap_thread_exit(void);
void __init_time(addr_t commPageTable);
void __arch_init_time(struct real_time_data *data, bool setDefaults);