summaryrefslogtreecommitdiff
path: root/cancel.c
diff options
context:
space:
mode:
authorrpj <rpj>2000-08-17 10:18:36 +0000
committerrpj <rpj>2000-08-17 10:18:36 +0000
commita366b6d8c2e6debf247c82af3d41aa2483711c52 (patch)
treee2a2f6785897a8789f88403e99d4f03dce301607 /cancel.c
parent951895c3aa196e90d4a5ecefe337d8773b8d33b7 (diff)
2000-08-17 Ross Johnson <rpj@special.ise.canberra.edu.au>
* All applicable: Change _pthread_ prefix to ptw32_ prefix to remove leading underscores from private library identifiers (single and double leading underscores are reserved in the ANSI C standard for compiler implementations).
Diffstat (limited to 'cancel.c')
-rw-r--r--cancel.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/cancel.c b/cancel.c
index c072d44..3273299 100644
--- a/cancel.c
+++ b/cancel.c
@@ -28,7 +28,7 @@
static void
-_pthread_cancel_self(void)
+ptw32_cancel_self(void)
{
#if defined(_MSC_VER) && !defined(__cplusplus)
@@ -59,10 +59,10 @@ _pthread_cancel_self(void)
/*
- * _pthread_cancel_thread implements asynchronous cancellation.
+ * ptw32_cancel_thread implements asynchronous cancellation.
*/
static void
-_pthread_cancel_thread(pthread_t thread)
+ptw32_ancel_thread(pthread_t thread)
{
HANDLE threadH = thread->threadH;
@@ -76,7 +76,7 @@ _pthread_cancel_thread(pthread_t thread)
CONTEXT context;
context.ContextFlags = CONTEXT_CONTROL;
GetThreadContext(threadH, &context);
- context.Eip = (DWORD) _pthread_cancel_self;
+ context.Eip = (DWORD) ptw32_cancel_self;
SetThreadContext(threadH, &context);
#endif
ResumeThread(threadH);
@@ -128,7 +128,7 @@ pthread_setcancelstate (int state, int *oldstate)
*/
{
int result = 0;
- pthread_t self = (pthread_t) pthread_getspecific (_pthread_selfThreadKey);
+ pthread_t self = (pthread_t) pthread_getspecific (ptw32_selfThreadKey);
if (self == NULL
|| (state != PTHREAD_CANCEL_ENABLE
@@ -158,7 +158,7 @@ pthread_setcancelstate (int state, int *oldstate)
{
ResetEvent(self->cancelEvent);
(void) pthread_mutex_unlock(&self->cancelLock);
- _pthread_cancel_self();
+ ptw32_cancel_self();
/* Never reached */
}
@@ -212,7 +212,7 @@ pthread_setcanceltype (int type, int *oldtype)
*/
{
int result = 0;
- pthread_t self = (pthread_t) pthread_getspecific (_pthread_selfThreadKey);
+ pthread_t self = (pthread_t) pthread_getspecific (ptw32_selfThreadKey);
if (self == NULL
|| (type != PTHREAD_CANCEL_DEFERRED
@@ -242,7 +242,7 @@ pthread_setcanceltype (int type, int *oldtype)
{
ResetEvent(self->cancelEvent);
(void) pthread_mutex_unlock(&self->cancelLock);
- _pthread_cancel_self();
+ ptw32_cancel_self();
/* Never reached */
}
@@ -283,7 +283,7 @@ pthread_testcancel (void)
* ------------------------------------------------------
*/
{
- pthread_t self = (pthread_t) pthread_getspecific (_pthread_selfThreadKey);
+ pthread_t self = (pthread_t) pthread_getspecific (ptw32_selfThreadKey);
if (self != NULL
&& self->cancelState == PTHREAD_CANCEL_ENABLE
@@ -355,7 +355,7 @@ pthread_cancel (pthread_t thread)
}
result = 0;
- self = (pthread_t) pthread_getspecific (_pthread_selfThreadKey);
+ self = (pthread_t) pthread_getspecific (ptw32_selfThreadKey);
/*
* FIXME!!
@@ -384,12 +384,12 @@ pthread_cancel (pthread_t thread)
if (cancel_self)
{
(void) pthread_mutex_unlock(&self->cancelLock);
- _pthread_cancel_self();
+ ptw32_cancel_self();
/* Never reached */
}
- _pthread_cancel_thread(thread);
+ ptw32_cancel_thread(thread);
}
else
{