ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libcoro/coro.c
(Generate patch)

Comparing libcoro/coro.c (file contents):
Revision 1.71 by root, Fri Nov 18 06:22:04 2016 UTC vs.
Revision 1.72 by root, Tue Aug 14 14:25:10 2018 UTC

594coro_destroy (coro_context *ctx) 594coro_destroy (coro_context *ctx)
595{ 595{
596 if (!pthread_equal (ctx->id, null_tid)) 596 if (!pthread_equal (ctx->id, null_tid))
597 { 597 {
598 pthread_cancel (ctx->id); 598 pthread_cancel (ctx->id);
599 pthread_mutex_unlock (&coro_mutex); 599 pthread_mutex_unlock (&coro_mutex); /* let the other coro run */
600 pthread_join (ctx->id, 0); 600 pthread_join (ctx->id, 0);
601 pthread_mutex_lock (&coro_mutex); 601 pthread_mutex_lock (&coro_mutex);
602 } 602 }
603 603
604 pthread_cond_destroy (&ctx->cv); 604 pthread_cond_destroy (&ctx->cv);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines