From ee2984326b89e0a38598c0bdf0aa7c76d865c9ed Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sun, 29 Jul 2007 05:22:05 +0000 Subject: * cygtls.h (_cygtls::inside_kernel): Move function declaration into _cygtls class. * exceptions.cc (_cygtls::inside_kernel): Move function definition into _cygtls class. * fhandler.cc (fhandler_base::wait_overlapped): Make return tri-state to detect when there is a EINTR situation. Add a pointer to a length parameter. Move GetOverlappedResult into this function. (fhandler_base::read_overlapped): Accommodate above changes and loop if we receive a restartable signal. (fhandler_base::write_overlapped): Ditto. * fhandler.h (fhandler_base::wait_overlapped): Reflect above changes. * fhandler_fifo.cc (fhandler_fifo::wait): Ditto. --- winsup/cygwin/exceptions.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'winsup/cygwin/exceptions.cc') diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index efb7a5448..648a39f43 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -282,13 +282,13 @@ stackdump (DWORD ebp, int open_file, bool isexception) i == 16 ? " (more stack frames may be present)" : ""); } -static bool -inside_kernel (CONTEXT *cx) +bool +_cygtls::inside_kernel (CONTEXT *cx) { int res; MEMORY_BASIC_INFORMATION m; - if (!_my_tls.isinitialized ()) + if (!isinitialized ()) return true; memset (&m, 0, sizeof m); @@ -627,7 +627,7 @@ _cygtls::handle_exceptions (EXCEPTION_RECORD *e, exception_list *frame, CONTEXT error_code |= 1; if (e->ExceptionInformation[0]) /* Write access */ error_code |= 2; - if (!inside_kernel (in)) /* User space */ + if (!me.inside_kernel (in)) /* User space */ error_code |= 4; klog (LOG_INFO, "%s[%d]: segfault at %08x rip %08x rsp %08x error %d", __progname, myself->pid, -- cgit v1.2.3