Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2008-05-23 00:32:15 +0400
committerCorinna Vinschen <corinna@vinschen.de>2008-05-23 00:32:15 +0400
commitc15121a287a2dbb59fdfe6b22ca6866f94f77f0a (patch)
tree83a973bd62a1556ca9f302eca1c1c0da7559bfe2
parent3ad8ec85469e01d3fc3e96479444c8094f70020a (diff)
* cygtls.h (struct san): Add two int values to store the current
tls_pathbuf counters. (return_from_fault): Restore tls_pathbuf counters. (setup_fault): Save tls_pathbuf counters. * tlsoffset.h: Regenerate.
-rw-r--r--winsup/cygwin/ChangeLog8
-rw-r--r--winsup/cygwin/cygtls.h11
-rw-r--r--winsup/cygwin/tlsoffsets.h82
3 files changed, 60 insertions, 41 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 11362be74..f38927840 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,13 @@
2008-05-22 Corinna Vinschen <corinna@vinschen.de>
+ * cygtls.h (struct san): Add two int values to store the current
+ tls_pathbuf counters.
+ (return_from_fault): Restore tls_pathbuf counters.
+ (setup_fault): Save tls_pathbuf counters.
+ * tlsoffset.h: Regenerate.
+
+2008-05-22 Corinna Vinschen <corinna@vinschen.de>
+
* sec_acl.cc (setacl): Set errno to EINVAL if user or group don't exist.
2008-05-22 Corinna Vinschen <corinna@vinschen.de>
diff --git a/winsup/cygwin/cygtls.h b/winsup/cygwin/cygtls.h
index 124bf4e6a..0c709b9bc 100644
--- a/winsup/cygwin/cygtls.h
+++ b/winsup/cygwin/cygtls.h
@@ -48,6 +48,7 @@ class tls_pathbuf
public:
void destroy ();
friend class tmp_pathbuf;
+ friend class _cygtls;
};
struct _local_storage
@@ -132,6 +133,8 @@ typedef struct
{
void *_myfault;
int _myfault_errno;
+ int _myfault_c_cnt;
+ int _myfault_w_cnt;
} san;
/* Changes to the below structure may require acompanying changes to the very
@@ -232,14 +235,22 @@ struct _cygtls
{
if (andreas._myfault_errno)
set_errno (andreas._myfault_errno);
+ /* Restore tls_pathbuf counters in case of error. */
+ locals.pathbufs.c_cnt = andreas._myfault_c_cnt;
+ locals.pathbufs.w_cnt = andreas._myfault_w_cnt;
__ljfault ((int *) andreas._myfault, 1);
}
int setup_fault (jmp_buf j, san& old_j, int myerrno) __attribute__ ((always_inline))
{
old_j._myfault = andreas._myfault;
old_j._myfault_errno = andreas._myfault_errno;
+ old_j._myfault_c_cnt = andreas._myfault_c_cnt;
+ old_j._myfault_w_cnt = andreas._myfault_w_cnt;
andreas._myfault = (void *) j;
andreas._myfault_errno = myerrno;
+ /* Save tls_pathbuf counters. */
+ andreas._myfault_c_cnt = locals.pathbufs.c_cnt;
+ andreas._myfault_w_cnt = locals.pathbufs.w_cnt;
return __sjfault (j);
}
void reset_fault (san& old_j) __attribute__ ((always_inline))
diff --git a/winsup/cygwin/tlsoffsets.h b/winsup/cygwin/tlsoffsets.h
index c82520112..52ed5c068 100644
--- a/winsup/cygwin/tlsoffsets.h
+++ b/winsup/cygwin/tlsoffsets.h
@@ -1,6 +1,6 @@
//;# autogenerated: Do not edit.
-//; $tls::sizeof__cygtls = 4284;
+//; $tls::sizeof__cygtls = 4292;
//; $tls::func = -12700;
//; $tls::pfunc = 0;
//; $tls::el = -12696;
@@ -43,26 +43,26 @@
//; $tls::p_ctinfo = 3188;
//; $tls::andreas = -9508;
//; $tls::pandreas = 3192;
-//; $tls::wq = -9500;
-//; $tls::pwq = 3200;
-//; $tls::prev = -9472;
-//; $tls::pprev = 3228;
-//; $tls::next = -9468;
-//; $tls::pnext = 3232;
-//; $tls::sig = -9464;
-//; $tls::psig = 3236;
-//; $tls::incyg = -9460;
-//; $tls::pincyg = 3240;
-//; $tls::spinning = -9456;
-//; $tls::pspinning = 3244;
-//; $tls::stacklock = -9452;
-//; $tls::pstacklock = 3248;
-//; $tls::stackptr = -9448;
-//; $tls::pstackptr = 3252;
-//; $tls::stack = -9444;
-//; $tls::pstack = 3256;
-//; $tls::initialized = -8420;
-//; $tls::pinitialized = 4280;
+//; $tls::wq = -9492;
+//; $tls::pwq = 3208;
+//; $tls::prev = -9464;
+//; $tls::pprev = 3236;
+//; $tls::next = -9460;
+//; $tls::pnext = 3240;
+//; $tls::sig = -9456;
+//; $tls::psig = 3244;
+//; $tls::incyg = -9452;
+//; $tls::pincyg = 3248;
+//; $tls::spinning = -9448;
+//; $tls::pspinning = 3252;
+//; $tls::stacklock = -9444;
+//; $tls::pstacklock = 3256;
+//; $tls::stackptr = -9440;
+//; $tls::pstackptr = 3260;
+//; $tls::stack = -9436;
+//; $tls::pstack = 3264;
+//; $tls::initialized = -8412;
+//; $tls::pinitialized = 4288;
//; __DATA__
#define tls_func (-12700)
@@ -107,23 +107,23 @@
#define tls_p_ctinfo (3188)
#define tls_andreas (-9508)
#define tls_pandreas (3192)
-#define tls_wq (-9500)
-#define tls_pwq (3200)
-#define tls_prev (-9472)
-#define tls_pprev (3228)
-#define tls_next (-9468)
-#define tls_pnext (3232)
-#define tls_sig (-9464)
-#define tls_psig (3236)
-#define tls_incyg (-9460)
-#define tls_pincyg (3240)
-#define tls_spinning (-9456)
-#define tls_pspinning (3244)
-#define tls_stacklock (-9452)
-#define tls_pstacklock (3248)
-#define tls_stackptr (-9448)
-#define tls_pstackptr (3252)
-#define tls_stack (-9444)
-#define tls_pstack (3256)
-#define tls_initialized (-8420)
-#define tls_pinitialized (4280)
+#define tls_wq (-9492)
+#define tls_pwq (3208)
+#define tls_prev (-9464)
+#define tls_pprev (3236)
+#define tls_next (-9460)
+#define tls_pnext (3240)
+#define tls_sig (-9456)
+#define tls_psig (3244)
+#define tls_incyg (-9452)
+#define tls_pincyg (3248)
+#define tls_spinning (-9448)
+#define tls_pspinning (3252)
+#define tls_stacklock (-9444)
+#define tls_pstacklock (3256)
+#define tls_stackptr (-9440)
+#define tls_pstackptr (3260)
+#define tls_stack (-9436)
+#define tls_pstack (3264)
+#define tls_initialized (-8412)
+#define tls_pinitialized (4288)