* dcrt0.cc (signal_shift_subtract): Eliminate ancient backwards compatibility. (check_sanity_and_sync): Ditto. * winsup.h (SIGTOMASK): Ditto. Just use constant in signal calculation. * include/cygwin/version: Remove backwards signal mask compatibility define. * path.cc (symlink_info::check_sysfile): Cosmetic change. * registry.cc (get_registry_hive_path): Remove unneeded variable. * exceptions.cc (handle_sigsuspend): Eliminate thread signal mask and use either main sigmask or current thread sigmask. (set_process_mask): Ditto. (sighold): Ditto. (sigrelse): Ditto. (sigset): Ditto. (set_process_mask_delta): Ditto. (_cygtls::call_signal_handler): Ditto. * fhandler_process.cc (format_process_status): Ditto. * fhandler_termios.cc (fhandler_termios::bg_check): Ditto. * pinfo.h (class pinfo): Ditto. * select.cc (pselect): Ditto. * signal.cc (sigprocmask): Ditto. (abort): Ditto. (sigpause): Ditto. (sigsend): Ditto. (wait_sig): Ditto. * thread.h (pthread::parent_tls): New member. * thread.cc (pthread::pthread): Record parent_tls here. (pthread::thread_init_wrapper): Initialize sigmask from parent thread.
		
			
				
	
	
		
			49 lines
		
	
	
		
			948 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			49 lines
		
	
	
		
			948 B
		
	
	
	
		
			C++
		
	
	
	
	
	
/* xsique.cc.  XSI insque and remque functions.
 | 
						|
 | 
						|
   Copyright 2007 Red Hat, Inc.
 | 
						|
 | 
						|
This file is part of Cygwin.
 | 
						|
 | 
						|
This software is a copyrighted work licensed under the terms of the
 | 
						|
Cygwin license.  Please consult the file "CYGWIN_LICENSE" for
 | 
						|
details. */
 | 
						|
 | 
						|
#include <search.h>
 | 
						|
 | 
						|
extern "C" void
 | 
						|
insque (void *velement, void *vpred)
 | 
						|
{
 | 
						|
  if (!velement)
 | 
						|
    return;
 | 
						|
 | 
						|
  struct qelem *element = (struct qelem *) velement;
 | 
						|
  struct qelem *pred = (struct qelem *) vpred;
 | 
						|
  struct qelem *succ;
 | 
						|
 | 
						|
  if (pred)
 | 
						|
    {
 | 
						|
      if ((succ = element->q_forw = pred->q_forw))
 | 
						|
	succ->q_back = element;
 | 
						|
      pred->q_forw = element;
 | 
						|
    }
 | 
						|
  else
 | 
						|
    element->q_forw = NULL;
 | 
						|
  element->q_back = pred;
 | 
						|
}
 | 
						|
 | 
						|
extern "C" void
 | 
						|
remque (void *velement)
 | 
						|
{
 | 
						|
  if (!velement)
 | 
						|
    return;
 | 
						|
 | 
						|
  struct qelem *pred = ((struct qelem *) velement)->q_back;
 | 
						|
  struct qelem *succ = ((struct qelem *) velement)->q_forw;
 | 
						|
 | 
						|
  if (succ)
 | 
						|
    succ->q_back = pred;
 | 
						|
  if (pred)
 | 
						|
    pred->q_forw = succ;
 | 
						|
}
 | 
						|
 |