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:
authorRobert Collins <rbtcollins@hotmail.com>2002-07-04 18:17:30 +0400
committerRobert Collins <rbtcollins@hotmail.com>2002-07-04 18:17:30 +0400
commitd288c1c78caa40281a1ef6ea515c0b900155e5bc (patch)
treecdcaccc77f91b52417516ef4d944a100fde320f1 /winsup/cygwin/pthread.cc
parent875beea4608c40361a725954d4c1a8c383f1b152 (diff)
2002-06-25 Thomas Pfaff <tpfaff@gmx.net>
* include/pthread.h (PTHREAD_CANCELED): Defined a reasonable value. * pthread.cc (pthread_exit): Call method instead of function. (pthread_setcancelstate): Ditto. (pthread_setcanceltype): Ditto. (pthread_testcancel): Ditto. * thread.h (pthread::cancel_event): New member. (__pthread_cancel_self): New prototype. (pthread::exit): New Method. (pthread::cancel): Ditto. (pthread::testcancel): Ditto. (pthread::cancel_self): Ditto. (pthread::static_cancel_self): Ditto. (pthread::setcancelstate): Ditto. (pthread::setcanceltype): Ditto. (__pthread_cancel): Give c++ linkage. (__pthread_exit): Remove. (__pthread_setcancelstate): Ditto. (__pthread_setcanceltype): Ditto. (__pthread_testcancel): Ditto. * thread.cc (pthread::pthread): Inititialize cancel_event. (pthread::~pthread): Close cancel_event if needed. (pthread::create): Create cancel_event. (pthread::exit): New method. Replacement for __pthread_exit. (pthread::cancel): New method. (pthread::testcancel): Ditto. (pthread::static_cancel_self); New static method. (pthread::setcancelstate): New method. Replacement for __pthread_setcancelstate. (pthread::setcanceltype): New method. Replacement for __pthread_setcanceltype. (pthread::pop_cleanup_handler): Added lock for async cancel safe cancellation. (pthread::thread_init_wrapper): Change __pthread_exit to thread->exit(). (__pthread_cancel): Call method thread->cancel(). (__pthread_exit): Remove. (__pthread_setcancelstate): Ditto. (__pthread_setcanceltype): Ditto. (__pthread_testcancel): Ditto.
Diffstat (limited to 'winsup/cygwin/pthread.cc')
-rw-r--r--winsup/cygwin/pthread.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/winsup/cygwin/pthread.cc b/winsup/cygwin/pthread.cc
index ab7fd1fbe..0484f0412 100644
--- a/winsup/cygwin/pthread.cc
+++ b/winsup/cygwin/pthread.cc
@@ -140,7 +140,7 @@ pthread_attr_getstackaddr (const pthread_attr_t * attr, void **stackaddr)
void
pthread_exit (void *value_ptr)
{
- return __pthread_exit (value_ptr);
+ return pthread::self()->exit (value_ptr);
}
int
@@ -428,25 +428,25 @@ pthread_cancel (pthread_t thread)
int
pthread_setcancelstate (int state, int *oldstate)
{
- return __pthread_setcancelstate (state, oldstate);
+ return pthread::self()->setcancelstate (state, oldstate);
}
int
pthread_setcanceltype (int type, int *oldtype)
{
- return __pthread_setcanceltype (type, oldtype);
+ return pthread::self()->setcanceltype (type, oldtype);
}
void
pthread_testcancel (void)
{
- __pthread_testcancel ();
+ pthread::self()->testcancel ();
}
void
_pthread_cleanup_push (__pthread_cleanup_handler *handler)
{
- pthread::self()->push_cleanup_handler(handler);
+ pthread::self()->push_cleanup_handler (handler);
}
void