forked from openvswitch/ovs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ovs_threads: Avoid running pthread destructors from main thread exit.
Windows uses pthreads-win32 library to provide the Linux pthread functionality. It is observed that when the main thread calls a pthread destructor after it exits, undefined behavior is seen (e.g., junk values in data, causing pthread deadlocks). Similar behavior has been seen by other people as seen in the following email thread: https://sourceware.org/ml/pthreads-win32/2003/msg00001.html To avoid this, this commit de-registers the thread destructor when the main thread exits (via the atexit handler). Signed-off-by: Gurucharan Shetty <[email protected]> Acked-by: Ben Pfaff <[email protected]>
- Loading branch information
Showing
3 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters