mirror of
https://github.com/drasko/codezero.git
synced 2026-01-27 02:03:14 +01:00
Created container.h and added more comprehensive hello world
Added a per-container container.h that inclues useful definitions. Hello world now is in a separate file not to modify main too often. hello world now prints container name and id.
This commit is contained in:
13
conts/test/hello.c
Normal file
13
conts/test/hello.c
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* Autogenerated hello world print function
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <container.h>
|
||||
|
||||
int print_hello_world(void)
|
||||
{
|
||||
printf("%s: Hello world from %s!\n", __CONTAINER__, __CONTAINER_NAME__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -5,9 +5,12 @@
|
||||
#include <l4lib/arch/syscalls.h>
|
||||
#include <l4/api/space.h>
|
||||
|
||||
extern int print_hello_world(void);
|
||||
|
||||
int main(void)
|
||||
{
|
||||
printf("Hello World!\n");
|
||||
print_hello_world();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user