* cygwait.h (enum cw_wait_mask): Add cw_sig_restart. Add comments
to explain the meaning of the possible values. * cygwait.cc (is_cw_sig_restart): Define. (is_cw_sig_handle): Check for cw_sig_restart as well. (cygwait): Restart always if cw_sig_restart is set. * thread.cc (pthread::join): Call cygwait with cw_sig_restart flag to avoid having to handle signals at all.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/* thread.cc: Locking and threading module functions
|
||||
|
||||
Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
|
||||
2009, 2010, 2011, 2012, 2013, 2014 Red Hat, Inc.
|
||||
2009, 2010, 2011, 2012, 2013, 2014, 2015 Red Hat, Inc.
|
||||
|
||||
This file is part of Cygwin.
|
||||
|
||||
@@ -2399,7 +2399,8 @@ pthread::join (pthread_t *thread, void **return_val)
|
||||
(*thread)->attr.joinable = PTHREAD_CREATE_DETACHED;
|
||||
(*thread)->mutex.unlock ();
|
||||
|
||||
switch (cygwait ((*thread)->win32_obj_id, cw_infinite, cw_sig | cw_cancel))
|
||||
switch (cygwait ((*thread)->win32_obj_id, cw_infinite,
|
||||
cw_sig | cw_sig_restart | cw_cancel))
|
||||
{
|
||||
case WAIT_OBJECT_0:
|
||||
if (return_val)
|
||||
|
Reference in New Issue
Block a user