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:
authorChristopher Faylor <me@cgf.cx>2003-12-03 08:21:55 +0300
committerChristopher Faylor <me@cgf.cx>2003-12-03 08:21:55 +0300
commitd1eb7a4615a95da05f4bbc2e93e167b8afe6f0dc (patch)
treec8259c647b2b6d0c356f01c8476268c2270dda51 /winsup/cygwin/exceptions.cc
parentaf9ef8abb2ad0423c20b28c5050a3b6e82d4e90c (diff)
* cygthread.cc (cygthread::stub): Properly establish _threadinfo environment.
(cygthread::stub2): New function. (cygthread::simplestub): Ditto. (cygthread::simplestub2): New function. * cygthread.h (cygthread::stub2): Declare new function. (cygthread::simplestub2): Ditto. * cygtls.h (_threadinfo::call): Declare new function. (_threadinfo::call2): Ditto. * dcrt0.cc (dll_crt0_1): Accommodate new _threadinfo::init which doesn't return pointer to tls. (_dll_crt0): Remove obsolete DECLARE_TLS_STORAGE. (dll_crt0): Ditto. * exceptions.cc (_threadinfo::call): New function. (_threadinfo::call2): Ditto. (_threadinfo::init): Don't return pointer. * thread.cc (pthread::thread_init_wrapper): Properly establish _threadinfo environment. (pthread::thread_init_wrapper2): New function. * thread.h (pthread::thread_init_wrapper): Remove noreturn attribute (pthread::thread_init_wrapper2): Declare new function. * winbase.h: Remove obsolete code.
Diffstat (limited to 'winsup/cygwin/exceptions.cc')
-rw-r--r--winsup/cygwin/exceptions.cc19
1 files changed, 16 insertions, 3 deletions
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
index 6e5aa3059..15a9eb117 100644
--- a/winsup/cygwin/exceptions.cc
+++ b/winsup/cygwin/exceptions.cc
@@ -147,8 +147,22 @@ _threadinfo::reset_exception ()
}
}
-_threadinfo *
-_threadinfo::init (void *, void *thread)
+void
+_threadinfo::call (void (*func) (void *, void *), void *arg)
+{
+ char buf[CYGTLS_PADSIZE];
+ _my_tls.call2 (func, arg, buf);
+}
+
+void
+_threadinfo::call2 (void (*func) (void *, void *), void *arg, void *buf)
+{
+ init (buf);
+ func (arg, buf);
+}
+
+void
+_threadinfo::init (void *)
{
memset (this, 0, sizeof (*this));
stackptr = stack;
@@ -157,7 +171,6 @@ _threadinfo::init (void *, void *thread)
_last_thread = this;
set_state (false);
errno_addr = &errno;
- return this;
}
void