mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-05 19:35:52 +03:00
(pthread_cancel): Use the result of __pthread_kill.
This commit is contained in:
@@ -27,6 +27,7 @@ pthread_cancel (th)
|
|||||||
pthread_t th;
|
pthread_t th;
|
||||||
{
|
{
|
||||||
volatile struct pthread *pd = (volatile struct pthread *) th;
|
volatile struct pthread *pd = (volatile struct pthread *) th;
|
||||||
|
int result = 0;
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
@@ -49,7 +50,7 @@ pthread_cancel (th)
|
|||||||
|
|
||||||
/* The cancellation handler will take care of marking the
|
/* The cancellation handler will take care of marking the
|
||||||
thread as canceled. */
|
thread as canceled. */
|
||||||
__pthread_kill (th, SIGCANCEL);
|
result = __pthread_kill (th, SIGCANCEL);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -61,5 +62,5 @@ pthread_cancel (th)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return result;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user