]> rtime.felk.cvut.cz Git - frescor/frsh.git/commitdiff
Destroy forb in the correct order
authorMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 24 Feb 2011 15:58:36 +0000 (16:58 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 24 Feb 2011 15:58:36 +0000 (16:58 +0100)
This is to avoid deadlocks during forb_destroy().

frsh_api/frsh_core.c

index 3ad34b73f4f4fb18cc0b44c728c0670b1e27f110..1e17525f152f9aced0f34833df4e2e46ece28f82 100644 (file)
@@ -161,10 +161,11 @@ err:
 
 void frsh_destroy()
 {
+       forb_destroy(frsh_forb_global.orb);
+       
        pthread_cancel(frsh_forb_global.alloc_executor_thread.pthread_id);
        pthread_join(frsh_forb_global.alloc_executor_thread.pthread_id, NULL);
 
-       forb_destroy(frsh_forb_global.orb);
        /* TODO: Destroy all FRAs etc. */
 }