aboutsummaryrefslogtreecommitdiff
path: root/src/core/transport.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2016-12-13 22:41:35 -0800
committerGarrett D'Amore <garrett@damore.org>2016-12-13 22:41:35 -0800
commitec9f917101371baaae34ca10ae952392c2c2343d (patch)
tree9ad7b85748d4d70248c7e720e5e3045ef2d77f6b /src/core/transport.h
parent4919519754a0b5aee826add75273c291c33c4b5f (diff)
downloadnng-ec9f917101371baaae34ca10ae952392c2c2343d.tar.gz
nng-ec9f917101371baaae34ca10ae952392c2c2343d.tar.bz2
nng-ec9f917101371baaae34ca10ae952392c2c2343d.zip
More comments, and detection of fork-reentrancy. Much effort was spent
trying to come to a fork-safe solution, but ultimately we gave up.
Diffstat (limited to 'src/core/transport.h')
-rw-r--r--src/core/transport.h19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/core/transport.h b/src/core/transport.h
index c79c12ad..71eb8a28 100644
--- a/src/core/transport.h
+++ b/src/core/transport.h
@@ -52,19 +52,16 @@ struct nni_transport {
/*
* tran_fini, if not NULL, is called during library deinitialization.
- * It should release any global resources.
+ * It should release any global resources, close any open files, etc.
+ *
+ * There will be no locks held, and no other threads running in the
+ * library.
+ *
+ * It is invalid to use any mutexes, condition variables, or
+ * threading routines. Mutexes and condition variables may be
+ * safely destroyed.
*/
void (*tran_fini)(void);
-
- /*
- * tran_fork, if not NULL, is called just before fork
- * (e.g. during pthread_atfork() for the prefork phase),
- * and again just after returning in the parent. There is
- * nothing called for the child. If the transport does not
- * create any threads of its own, this can be NULL. (The
- * intended use is to prevent O_CLOEXEC races.)
- */
- void (*tran_fork)(int prefork);
};
/*