]> rtime.felk.cvut.cz Git - frescor/frsh-forb.git/blobdiff - src/forb/src/forb.h
Prepare for compiling FORB "components" for RTEMS
[frescor/frsh-forb.git] / src / forb / src / forb.h
index 9e26590d4e201c4c4769a2bdaf7fdda62504361c..e44d49cdd4f4e5ab64474336a658c87c949ed19b 100644 (file)
@@ -168,8 +168,10 @@ typedef struct forb_init_attr {
  * Initializes FORB. This function has to be called before any other
  * FORB function.
  * 
- * Any command line arguments used by FORB are removed from the array
- * and @a argc and @a argv are updated accordingly.
+ * Any command line arguments used by FORB are removed from the @a
+ * argv array and @a argc is updated accordingly.
+ *
+ * @note Currently, no command line arguments are used by FORB.
  * 
  * @param argc a pointer to the number of command line arguments.
  * @param argv a pointer to the array of command line arguments.
@@ -232,6 +234,25 @@ forb_daemon_prepare(const char *pid);
 void
 forb_daemon_ready();
 
+int
+forb_signal_server_ready();    
+
+/** 
+ * \def FORB_MAIN(id, orb, argc, argv)
+ *
+ * Introduce the definition of the main forb function i.e. the
+ * function which is called upon loading the FORB "component".
+ * 
+ * @param id "C" identifier of the function. On some platforms, it is
+ * used to distinguish multiple FORB_MAIN functions from each other. *
+ *
+ * Example usage: FORB_MAIN(frm_dummy, forb_orb orb, int argc, char *argv[])
+ */
+#ifdef rtems
+#define FORB_MAIN(id, orb, argc, argv) int forb_main_ ## id(orb, argc, argv)
+#else  
+#define FORB_MAIN(id, orb, argc, argv) int forb_main(orb, argc, argv)
+#endif
 
 #ifdef __cplusplus
 } /* extern "C"*/