* bsd_helper.h: Throughout, convert "struct thread" to "class thread".
* bsd_mutex.cc (_msleep): Fetch signal_arrived handle from thread's ipcblk. * process.h (class process): Drop _signal_arrived and align methods. (process_cache::process): Drop signal_arrived parameter. * process.cc (process::process): Ditto. Drop related code. (process::~process): Drop closing signal_arrived handle. (process_cache::process): Drop signal_arrived parameter in call to process::process. (thread::dup_signal_arrived): New method duplicating thread's signal_arrived handle. (thread::close_signal_arrived): New method closing thread's signal_arrived handle. * msg.cc (client_request_msg::serve): Drop signal_arrived parameter from call to process_cache::process. Use thread constructor to initialize td. * sem.cc (client_request_sem::serve): Ditto. * shm.cc (client_request_shm::serve): Ditto.
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
/* bsd_mutex.cc
|
||||
|
||||
Copyright 2003, 2004, 2005, 2007, 2012, 2014 Red Hat Inc.
|
||||
Copyright 2003, 2004, 2005, 2007, 2012, 2014, 2015 Red Hat Inc.
|
||||
|
||||
This file is part of Cygwin.
|
||||
|
||||
@ -314,13 +314,12 @@ _msleep (void *ident, struct mtx *mtx, int priority,
|
||||
evt,
|
||||
msleep_glob_evt,
|
||||
td->client->handle (),
|
||||
td->client->signal_arrived ()
|
||||
td->ipcblk->signal_arrived
|
||||
};
|
||||
/* PCATCH handling. If PCATCH is given and signal_arrived is a valid
|
||||
handle, then it's used in the WaitFor call and EINTR is returned. */
|
||||
int obj_cnt = 3;
|
||||
if ((priority & PCATCH)
|
||||
&& td->client->signal_arrived () != INVALID_HANDLE_VALUE)
|
||||
if ((priority & PCATCH) && obj[3])
|
||||
obj_cnt = 4;
|
||||
switch (WaitForMultipleObjects (obj_cnt, obj, FALSE, timo ?: INFINITE))
|
||||
{
|
||||
|
Reference in New Issue
Block a user