* cygerrno.h (geterrno_from_nt_status): Declare.
* errno.cc (geterrno_from_nt_status): Define. * flock.cc: Fix copyright dates. * ntdll.h (enum _TIMER_TYPE): Define. (PTIMER_APC_ROUTINE): Define. (NtCancelTimer): Declare. (NtCreateTimer): Declare. (NtSetTimer): Declare. * posix_ipc.cc (ipc_cond_timedwait): Rewrite to make interruptible and restartable. Call pthread_testcancel in case of timeout to enable pthread_cancel on waiting thread. Replace WFMO timeout with waiting for a waitable timer. Explain why. Replace single call to WFMO with two calls, one for the event, one for the mutex. Don't lock mutex in case of error. (ipc_cond_signal): Make void function. (ipc_cond_close): Ditto. (_mq_send): Immediately return -1 in case of error from ipc_cond_timedwait. (_mq_receive): Ditto.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/* cygerrno.h: main Cygwin header file.
|
||||
|
||||
Copyright 2000, 2001, 2002, 2003, 2004, 2010 Red Hat, Inc.
|
||||
Copyright 2000, 2001, 2002, 2003, 2004, 2010, 2011 Red Hat, Inc.
|
||||
|
||||
This file is part of Cygwin.
|
||||
|
||||
@@ -16,6 +16,7 @@ void __stdcall seterrno_from_win_error (const char *file, int line, DWORD code)
|
||||
void __stdcall seterrno_from_nt_status (const char *file, int line, NTSTATUS status) __attribute__ ((regparm(3)));
|
||||
void __stdcall seterrno (const char *, int line) __attribute__ ((regparm(2)));
|
||||
int __stdcall geterrno_from_win_error (DWORD code = GetLastError (), int deferrno = 13 /*EACCESS*/) __attribute__ ((regparm(2)));
|
||||
int __stdcall geterrno_from_nt_status (NTSTATUS status, int deferrno = 13 /*EACCESS*/) __attribute__ ((regparm(2)));
|
||||
|
||||
#define __seterrno() seterrno (__FILE__, __LINE__)
|
||||
#define __seterrno_from_win_error(val) seterrno_from_win_error (__FILE__, __LINE__, val)
|
||||
|
Reference in New Issue
Block a user