summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-04-20 21:04:14 +0000
committerbors <bors@rust-lang.org>2017-04-20 21:04:14 +0000
commit19fb98d6f1e6ed367c8062d91b04638133d47a9f (patch)
treebaad30739da98ec761b4ad059b6fb6ec03f932f6
parent397f851289063a8bca0ff08981bdb002430ca3ec (diff)
parent9192435999bbeca0830f87f4f75e008641135297 (diff)
downloadrust-libc-19fb98d6f1e6ed367c8062d91b04638133d47a9f.tar.gz
Auto merge of #577 - malbarbo:pthread_atfork, r=alexcrichton
Add pthread_atfork function
-rw-r--r--src/unix/mod.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/unix/mod.rs b/src/unix/mod.rs
index 15152eb120..74ed97d650 100644
--- a/src/unix/mod.rs
+++ b/src/unix/mod.rs
@@ -576,6 +576,9 @@ extern {
link_name = "pthread_join$UNIX2003")]
pub fn pthread_join(native: ::pthread_t,
value: *mut *mut ::c_void) -> ::c_int;
+ pub fn pthread_atfork(prepare: Option<unsafe extern fn()>,
+ parent: Option<unsafe extern fn()>,
+ child: Option<unsafe extern fn()>) -> ::c_int;
pub fn pthread_exit(value: *mut ::c_void);
pub fn pthread_attr_init(attr: *mut ::pthread_attr_t) -> ::c_int;
pub fn pthread_attr_destroy(attr: *mut ::pthread_attr_t) -> ::c_int;