* winsup.h (create_pipe): Declare new function.

(CreatePipe): New define.
* miscfuncs.cc (create_pipe): Define new function.
This commit is contained in:
Christopher Faylor 2005-08-19 14:56:48 +00:00
parent 4fa0a39865
commit babc4e5424
3 changed files with 24 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2005-08-19 Christopher Faylor <cgf@timesys.com>
* winsup.h (create_pipe): Declare new function.
(CreatePipe): New define.
* miscfuncs.cc (create_pipe): Define new function.
2005-08-18 Christopher Faylor <cgf@timesys.com> 2005-08-18 Christopher Faylor <cgf@timesys.com>
* fhandler.h (fhandler_tty_common::lseek): Declare new method. * fhandler.h (fhandler_tty_common::lseek): Declare new method.

View File

@ -347,3 +347,17 @@ nice_to_winprio (int &nice)
prio = NORMAL_PRIORITY_CLASS; prio = NORMAL_PRIORITY_CLASS;
return prio; return prio;
} }
#undef CreatePipe
bool
create_pipe (PHANDLE hr,PHANDLE hw, LPSECURITY_ATTRIBUTES sa, DWORD n)
{
for (int i = 0; i < 10; i++)
if (CreatePipe (hr, hw, sa, n))
return true;
else if (GetLastError () == ERROR_PIPE_BUSY && i < 9)
Sleep (10);
else
break;
return false;
}

View File

@ -308,6 +308,10 @@ size_t getshmlba ();
int winprio_to_nice (DWORD) __attribute__ ((regparm (1))); int winprio_to_nice (DWORD) __attribute__ ((regparm (1)));
DWORD nice_to_winprio (int &) __attribute__ ((regparm (1))); DWORD nice_to_winprio (int &) __attribute__ ((regparm (1)));
bool __stdcall create_pipe (PHANDLE hr, PHANDLE, LPSECURITY_ATTRIBUTES, DWORD)
__attribute__ ((regparm (3)));
#define CreatePipe create_pipe
/**************************** Exports ******************************/ /**************************** Exports ******************************/
extern "C" { extern "C" {