]> rtime.felk.cvut.cz Git - frescor/frsh.git/blobdiff - frsh_api/frsh_core.c
Destroy forb in the correct order
[frescor/frsh.git] / frsh_api / frsh_core.c
index 348e8e041ed4138f6a204822a9c0b55388c31531..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. */
 }
 
@@ -177,7 +178,6 @@ bool frsh_config_is_admission_test_enabled()
 
 frsh_resource_id_t frsh_get_local_cpu_id(void)
 {
-       frsh_resource_id_t id;
        long int ret =  FRSH_CPU_ID_DEFAULT;
        if (getenv("FRSH_CPU_ID")) {
                errno = 0;      /* See strtol(1) */