1 /* miscfuncs.h: main Cygwin header file.
3 Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 2005, 2006, 2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
6 This file is part of Cygwin.
8 This software is a copyrighted work licensed under the terms of the
9 Cygwin license. Please consult the file "CYGWIN_LICENSE" for
14 int winprio_to_nice (DWORD) __attribute__ ((regparm (1)));
15 DWORD nice_to_winprio (int &) __attribute__ ((regparm (1)));
17 bool __stdcall create_pipe (PHANDLE, PHANDLE, LPSECURITY_ATTRIBUTES, DWORD)
18 __attribute__ ((regparm (3)));
20 BOOL WINAPI CreatePipeOverlapped (PHANDLE read_handle, PHANDLE write_handle,
21 LPSECURITY_ATTRIBUTES sa);
22 BOOL WINAPI ReadPipeOverlapped (HANDLE h, PVOID buf, DWORD len,
23 LPDWORD ret_len, DWORD timeout);
24 BOOL WINAPI WritePipeOverlapped (HANDLE h, PCVOID buf, DWORD len,
25 LPDWORD ret_len, DWORD timeout);
27 extern "C" void yield ();
29 void backslashify (const char *, char *, bool);
30 void slashify (const char *, char *, bool);
31 #define isslash(c) ((c) == '/')
33 extern void transform_chars (PWCHAR, PWCHAR);
35 transform_chars (PUNICODE_STRING upath, USHORT start_idx)
37 transform_chars (upath->Buffer + start_idx,
38 upath->Buffer + upath->Length / sizeof (WCHAR) - 1);
42 int __stdcall check_invalid_virtual_addr (const void *s, unsigned sz) __attribute__ ((regparm(2)));
44 ssize_t check_iovec (const struct iovec *, int, bool) __attribute__ ((regparm(3)));
45 #define check_iovec_for_read(a, b) check_iovec ((a), (b), false)
46 #define check_iovec_for_write(a, b) check_iovec ((a), (b), true)
48 extern "C" HANDLE WINAPI CygwinCreateThread (LPTHREAD_START_ROUTINE thread_func,
49 PVOID thread_arg, PVOID stackaddr,
50 ULONG stacksize, ULONG guardsize,
54 #endif /*_MISCFUNCS_H*/