12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- #include <list.h>
- #include <bits/libc-lock.h>
- struct fork_block
- {
-
- __libc_lock_define (, lock);
-
- list_t prepare_list;
- list_t parent_list;
- list_t child_list;
- };
- extern struct fork_block __fork_block attribute_hidden;
- struct fork_handler
- {
- list_t list;
- void (*handler) (void);
- void *dso_handle;
- };
- extern void __unregister_atfork (void *dso_handle) attribute_hidden;
- #define UNREGISTER_ATFORK(dso_handle) __unregister_atfork (dso_handle)
- extern int __register_atfork (void (*__prepare) (void),
- void (*__parent) (void),
- void (*__child) (void),
- void *dso_handle);
- #ifndef ARCH_FORK
- # define ARCH_FORK() __libc_fork()
- #endif
|