mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-07-23 07:01:55 +08:00
init01: Add init.c
This commit is contained in:
parent
bd6dd6e233
commit
71703fec74
@ -9,6 +9,10 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <freebsd/bsd.h>
|
#include <freebsd/bsd.h>
|
||||||
|
|
||||||
|
/* XXX should these be in a header? */
|
||||||
|
void print_test_name(void);
|
||||||
|
void test_main(void);
|
||||||
|
|
||||||
/* XXX temporary until in .h file */
|
/* XXX temporary until in .h file */
|
||||||
void rtems_initialize_interfaces(void);
|
void rtems_initialize_interfaces(void);
|
||||||
|
|
||||||
@ -16,7 +20,8 @@ rtems_task Init(
|
|||||||
rtems_task_argument ignored
|
rtems_task_argument ignored
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
printf( "\n\n*** LIBFREEBSD INITIALIZATION TEST ***\n" );
|
print_test_name();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* BSD must support the new "shared IRQ PIC implementation" at this point.
|
* BSD must support the new "shared IRQ PIC implementation" at this point.
|
||||||
* BSPs must also provide rtems_interrupt_server_initialize() which
|
* BSPs must also provide rtems_interrupt_server_initialize() which
|
||||||
@ -28,11 +33,12 @@ rtems_task Init(
|
|||||||
puts( "Initializing interfaces" );
|
puts( "Initializing interfaces" );
|
||||||
rtems_initialize_interfaces();
|
rtems_initialize_interfaces();
|
||||||
|
|
||||||
puts( "Sleeping to see what happens" );
|
test_main();
|
||||||
sleep( 5 );
|
/* should not return */
|
||||||
|
|
||||||
printf( "*** END OF LIBFREEBSD INITIALIZATION TEST ***\n" );
|
printf( "*** Test main returned and should not have ***\n" );
|
||||||
exit( 0 );
|
|
||||||
|
exit( 5 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* configuration information */
|
/* configuration information */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user