#include <forb/server_id.h>
+FORB_MAIN(fcb, forb_orb orb, int argc, char *argv[]);
-int print_log_domain(ul_log_domain_t *domain, void *context)
-{
- printf("%s = %d\n", domain->name, domain->level);
- return 0;
-}
+
+// int print_log_domain(ul_log_domain_t *domain, void *context)
+// {
+// printf("%s = %d\n", domain->name, domain->level);
+// return 0;
+// }
struct forb_main_data {
char *filename;
if (ret) error(0, errno, "INET port registration failed");
#endif
-#ifdef CONFIG_FCB
- struct forb_main_data *data = malloc(sizeof(*data));
+//#ifdef CONFIG_FCB
+#ifdef RTEMS
+ struct forb_main_data *data = malloc(sizeof(struct forb_main_data));
data->filename = NULL;
data->orb = orb;
// prepare forb_main() parameters
#ifdef RTEMS
#include <frm_rtemscpu.h>
- struct forb_main_data *data = malloc(sizeof(*data));
- data->filename = NULL;
- data->orb = orb;
+ struct forb_main_data *data2 = malloc(sizeof(struct forb_main_data));
+ data2->filename = NULL;
+ data2->orb = orb;
// prepare forb_main() parameters
- data->argc = 0;
- data->argv = NULL;
- data->forb_main = &forb_main_frm_rtemscpu; // Component main address
- fosa_thread_create(&tid, NULL, forb_main_thread, data);
+ data2->argc = 0;
+ data2->argv = NULL;
+ data2->forb_main = &forb_main_frm_rtemscpu; // Component main address
+ fosa_thread_create(&tid, NULL, forb_main_thread, data2);
libs_loaded_cnt++;
- ret = forb_wait_for_server_ready(orb);
+ ret = forb_wait_for_server_ready(orb);
+
if (ret)
ERR( errno, "forb_wait_for_server_ready");
#endif
-
/* Allow other threads to continue execution, but exit
* ourselves (without exit()ing the whole process. */
- if (libs_loaded_cnt > 0)
- pthread_exit(NULL);
+// if (libs_loaded_cnt > 0)
+// pthread_exit(NULL);
return 0;
}