]> 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 c0f2cd400b22b69ee3d76a2fbccd23f1d53c0134..1e17525f152f9aced0f34833df4e2e46ece28f82 100644 (file)
@@ -162,6 +162,10 @@ 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);
+
        /* TODO: Destroy all FRAs etc. */
 }
 
@@ -174,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) */