]> 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 9b163e75609d5ec597c3e3b9320fe28a0a76477d..1e17525f152f9aced0f34833df4e2e46ece28f82 100644 (file)
@@ -159,6 +159,18 @@ err:
        return ret;
 }
 
+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. */
+}
+
+
+
 bool frsh_config_is_admission_test_enabled()
 {
        return true;
@@ -166,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) */