runtime_loader: Reinit the heap lock after fork.
This commit is contained in:
parent
296120e005
commit
3256001041
@ -43,6 +43,18 @@ export_unload_library(void* handle)
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
reinit_after_fork()
|
||||
{
|
||||
status_t returnstatus = B_OK;
|
||||
if (status_t status = elf_reinit_after_fork())
|
||||
returnstatus = status;
|
||||
if (status_t status = heap_reinit_after_fork())
|
||||
returnstatus = status;
|
||||
return returnstatus;
|
||||
}
|
||||
|
||||
|
||||
struct rld_export gRuntimeLoader = {
|
||||
// dynamic loading support API
|
||||
export_load_add_on,
|
||||
|
@ -288,12 +288,20 @@ grow_heap(size_t bytes)
|
||||
|
||||
|
||||
status_t
|
||||
heap_init(void)
|
||||
heap_init()
|
||||
{
|
||||
return add_area(kInitialHeapSize);
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
heap_reinit_after_fork()
|
||||
{
|
||||
recursive_lock_init(&sLock, kLockName);
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
||||
#ifdef HEAP_TEST
|
||||
void
|
||||
dump_chunks(void)
|
||||
|
@ -100,9 +100,10 @@ status_t elf64_verify_header(void *header, size_t length);
|
||||
void rldelf_init(void);
|
||||
void rldexport_init(void);
|
||||
void set_abi_version(int abi_version);
|
||||
status_t elf_reinit_after_fork(void);
|
||||
status_t elf_reinit_after_fork();
|
||||
|
||||
status_t heap_init(void);
|
||||
status_t heap_init();
|
||||
status_t heap_reinit_after_fork();
|
||||
|
||||
// arch dependent prototypes
|
||||
status_t arch_relocate_image(image_t* rootImage, image_t* image,
|
||||
|
Loading…
x
Reference in New Issue
Block a user