summaryrefslogtreecommitdiffstats
path: root/rtems_init.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-02-06 18:08:21 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-02-06 18:08:21 +0000
commite72d576583d98c78aa80656c8ac0d76e1daf192f (patch)
tree307d14eb3a51711f9f214de33a11b09a3ac8501e /rtems_init.c
parent2008-02-06 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadada-examples-e72d576583d98c78aa80656c8ac0d76e1daf192f.tar.bz2
2008-02-06 Joel Sherrill <joel.sherrill@oarcorp.com>
* Makefile.shared, rtems_init.c: More clean up and more generalization.
Diffstat (limited to 'rtems_init.c')
-rw-r--r--rtems_init.c26
1 files changed, 23 insertions, 3 deletions
diff --git a/rtems_init.c b/rtems_init.c
index 3c4d8a9..cc3699a 100644
--- a/rtems_init.c
+++ b/rtems_init.c
@@ -178,6 +178,17 @@ void *POSIX_Init( void *argument )
rtems_bsdnet_show_inet_routes ();
#endif
+ #if defined(MAIN_CALL_C_INITIALIZE_APPLICATION)
+ {
+ extern void initialize_application();
+ printk("Invoking C Application Initializion\n");
+ initialize_application();
+ }
+ #endif
+
+ /*
+ * Now create the thread that will be the GNAT Ada main.
+ */
status = pthread_attr_init( &attr );
assert( !status );
@@ -197,6 +208,10 @@ void *POSIX_Init( void *argument )
/* configuration information */
+#if defined(HAS_EXTRA_CONFIGURATION)
+#include "config.h"
+#endif
+
/* Standard output and a clock tick so time passes */
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
@@ -214,11 +229,16 @@ void *POSIX_Init( void *argument )
/* We want a clock tick every millisecond */
#define CONFIGURE_MICROSECONDS_PER_TICK RTEMS_MILLISECONDS_TO_MICROSECONDS(1)
-/* The initialization task is a POSIX Initialization thread with default attributes */
+/* The initialization task is a POSIX Initialization thread with default
+ * attributes.
+ */
#define CONFIGURE_POSIX_INIT_THREAD_TABLE
-/* We are using GNAT/RTEMS with a maximum of 20 Ada tasks and no fake Ada tasks. */
-/* A fake Ada task is a task created outside the Ada run-time that calls into Ada. */
+/* We are using GNAT/RTEMS with a maximum of 20 Ada tasks and no fake Ada
+ * tasks.
+ * NOTE: A fake Ada task is a task created outside the Ada run-time that
+ * calls into Ada.
+ */
#define CONFIGURE_GNAT_RTEMS
#define CONFIGURE_MAXIMUM_ADA_TASKS 20
#define CONFIGURE_MAXIMUM_FAKE_ADA_TASKS 0