Mercurial > hg > freeDiameter
diff libfdcore/p_sr.c @ 691:78b665400097
Cleanup all pthread_cleanup_push / pop pairs so that pop is always called after push, or ASSERT(0) is some grave errors
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Thu, 20 Jan 2011 19:44:27 +0900 |
parents | 8c3dc8584dab |
children | 4ffbc9f1e922 |
line wrap: on
line diff
--- a/libfdcore/p_sr.c Thu Jan 20 15:38:12 2011 +0900 +++ b/libfdcore/p_sr.c Thu Jan 20 19:44:27 2011 +0900 @@ -116,7 +116,7 @@ return NULL; } -/* thread that handles messages expiring. The thread is started / stopped only when needed */ +/* thread that handles messages expiring. The thread is started / cancelled only when needed */ static void * sr_expiry_th(void * arg) { struct sr_list * srlist = arg; struct msg * expired_req; @@ -183,6 +183,7 @@ error: ; /* pthread_cleanup_pop sometimes expands as "} ..." and the label beofre this cause some compilers to complain... */ pthread_cleanup_pop( 1 ); + ASSERT(0); /* we have encountered a problem, maybe time to signal the framework to terminate? */ return NULL; }