some modifications. * init.cc (dll_entry): Revert previous change. * miscfuncs.cc: Include sigproc.h for exit_thread declaration. * winsup.h (ExitThread): Define as 'exit_thread' to ensure no accidental use. * sigproc.cc (exit_thread): New function. (wait_sig): Handle __SIGTHREADEXIT case. Don't just block rather than returning from this function. * sigproc.h (__SIGTHREADEXIT): New enum. (exit_thread): Declare. * sync.cc (muto::release): Accept a tls command-line argument. * sync.h (muto::release): Accept a tls command-line parameter. Default to &_my_tls. * cygerrno.h (__set_errno): Define as extern so that no function code is ever emitted. * cygserver_ipc.h (cygserver_ipc.h): Ditto. * miscfuncs.h (transform_chars): Ditto. * path.h (has_attribute): Ditto. * security.h (privilege_luid): Ditto. * winsup.h (flush_file_buffers): Ditto.
		
			
				
	
	
		
			55 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			55 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
/* miscfuncs.h: main Cygwin header file.
 | 
						|
 | 
						|
   Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 | 
						|
   2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 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. */
 | 
						|
 | 
						|
#ifndef _MISCFUNCS_H
 | 
						|
#define _MISCFUNCS_H
 | 
						|
int winprio_to_nice (DWORD) __attribute__ ((regparm (1)));
 | 
						|
DWORD nice_to_winprio (int &) __attribute__ ((regparm (1)));
 | 
						|
 | 
						|
bool __stdcall create_pipe (PHANDLE, PHANDLE, LPSECURITY_ATTRIBUTES, DWORD)
 | 
						|
  __attribute__ ((regparm (3)));
 | 
						|
 | 
						|
BOOL WINAPI CreatePipeOverlapped (PHANDLE read_handle, PHANDLE write_handle,
 | 
						|
				  LPSECURITY_ATTRIBUTES sa);
 | 
						|
BOOL WINAPI ReadPipeOverlapped (HANDLE h, PVOID buf, DWORD len,
 | 
						|
				LPDWORD ret_len, DWORD timeout);
 | 
						|
BOOL WINAPI WritePipeOverlapped (HANDLE h, LPCVOID buf, DWORD len,
 | 
						|
				 LPDWORD ret_len, DWORD timeout);
 | 
						|
 | 
						|
extern "C" void yield ();
 | 
						|
 | 
						|
void backslashify (const char *, char *, bool);
 | 
						|
void slashify (const char *, char *, bool);
 | 
						|
#define isslash(c) ((c) == '/')
 | 
						|
 | 
						|
extern void transform_chars (PWCHAR, PWCHAR);
 | 
						|
extern inline void
 | 
						|
transform_chars (PUNICODE_STRING upath, USHORT start_idx)
 | 
						|
{
 | 
						|
  transform_chars (upath->Buffer + start_idx,
 | 
						|
		   upath->Buffer + upath->Length / sizeof (WCHAR) - 1);
 | 
						|
}
 | 
						|
 | 
						|
/* Memory checking */
 | 
						|
int __stdcall check_invalid_virtual_addr (const void *s, unsigned sz) __attribute__ ((regparm(2)));
 | 
						|
 | 
						|
ssize_t check_iovec (const struct iovec *, int, bool) __attribute__ ((regparm(3)));
 | 
						|
#define check_iovec_for_read(a, b) check_iovec ((a), (b), false)
 | 
						|
#define check_iovec_for_write(a, b) check_iovec ((a), (b), true)
 | 
						|
 | 
						|
extern "C" HANDLE WINAPI CygwinCreateThread (LPTHREAD_START_ROUTINE thread_func,
 | 
						|
					     PVOID thread_arg, PVOID stackaddr,
 | 
						|
					     ULONG stacksize, ULONG guardsize,
 | 
						|
					     DWORD creation_flags,
 | 
						|
					     LPDWORD thread_id);
 | 
						|
 | 
						|
#endif /*_MISCFUNCS_H*/
 |