commit 3d9952a3b14e83d265a09de9071dc3609e3a4cc9 Author: Nick Mathewson <ni...@torproject.org> Date: Tue Aug 18 08:36:58 2015 -0400
Improve threadlocal documentation --- src/common/compat_threads.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/common/compat_threads.h b/src/common/compat_threads.h index 9f34054..71562ba 100644 --- a/src/common/compat_threads.h +++ b/src/common/compat_threads.h @@ -133,11 +133,17 @@ int tor_threadlocal_init(tor_threadlocal_t *threadlocal); void tor_threadlocal_destroy(tor_threadlocal_t *threadlocal); /** * Return the current value of a thread-local variable for this thread. + * + * It's undefined behavior to use this function if the threadlocal hasn't + * been initialized, or has been destroyed. */ void *tor_threadlocal_get(tor_threadlocal_t *threadlocal); /** * Change the current value of a thread-local variable for this thread to * <b>value</b>. + * + * It's undefined behavior to use this function if the threadlocal hasn't + * been initialized, or has been destroyed. */ void tor_threadlocal_set(tor_threadlocal_t *threadlocal, void *value); _______________________________________________ tor-commits mailing list tor-commits@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits