From: Ben Pfaff Date: Fri, 7 Feb 2014 01:06:00 +0000 (-0800) Subject: ovs-thread: Add a comment. X-Git-Tag: sliver-openvswitch-2.1.90-1~7^2~4 X-Git-Url: http://git.onelab.eu/?p=sliver-openvswitch.git;a=commitdiff_plain;h=9a1a10918615d2138d93a315a6af83253e9d88dd ovs-thread: Add a comment. Reported-by: YAMAMOTO Takashi Signed-off-by: Ben Pfaff --- diff --git a/lib/ovs-thread.h b/lib/ovs-thread.h index 8cf2ecca3..f0318948b 100644 --- a/lib/ovs-thread.h +++ b/lib/ovs-thread.h @@ -444,9 +444,15 @@ void xpthread_join(pthread_t, void **); * (by recompiling). Thus, one may more freely use this form of * thread-specific data. * - * Compared to pthread_key_t, ovsthread_key_t has the follow limitations: + * ovsthread_key_t also differs from pthread_key_t in the following ways: * * - Destructors must not access thread-specific data (via ovsthread_key). + * + * - The pthread_key_t API allows concurrently exiting threads to start + * executing the destructor after pthread_key_delete() returns. The + * ovsthread_key_t API guarantees that, when ovsthread_key_delete() + * returns, all destructors have returned and no new ones will start + * execution. */ typedef struct ovsthread_key *ovsthread_key_t;