Add a comment about implicit synchronization which
fat-rwlock seems to rely on.

Signed-off-by: YAMAMOTO Takashi <yamam...@valinux.co.jp>
---
 lib/ovs-thread.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lib/ovs-thread.h b/lib/ovs-thread.h
index 8cf2ecc..dab7510 100644
--- a/lib/ovs-thread.h
+++ b/lib/ovs-thread.h
@@ -447,6 +447,14 @@ void xpthread_join(pthread_t, void **);
  * Compared to pthread_key_t, ovsthread_key_t has the follow limitations:
  *
  *    - Destructors must not access thread-specific data (via ovsthread_key).
+ *
+ * Unlike pthread_key_t, this API implicitly serializes key removal
+ * (ovsthread_key_delete) and thread exit. (destructor)
+ * I.e.
+ *    - ovsthread_key_delete ensures the completion of destructors for
+ *      the key.
+ *    - Once ovsthread_key_delete completed, no destructors for the key
+ *      will be executed on thread exit.
  */
 typedef struct ovsthread_key *ovsthread_key_t;
 
-- 
1.8.3.1

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to