Added posix code

This commit is contained in:
Bahadir Balban
2009-09-29 21:55:59 +03:00
parent 54272ccb63
commit f0bb0a4657
478 changed files with 63161 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
/*
* Simple linker script for userspace or svc tasks.
*
* Copyright (C) 2007 Bahadir Balban
*/
/*
* The only catch with this linker script is that everything
* is linked starting at virtual_base, and loaded starting
* at physical_base. virtual_base is the predefined region
* of virtual memory for userland applications. physical_base
* is determined at build-time, it is one of the subsequent pages
* that come after the kernel image's load area.
*/
/* USER_AREA_START, see memlayout.h */
virtual_base = 0x10000000;
physical_base = 0x8000;
__stack = (0x20000000 - 0x1000 - 8); /* First page before the env/args */
/* INCLUDE "include/physical_base.lds" */
/* physical_base = 0x228000; */
offset = virtual_base - physical_base;
ENTRY(_start)
SECTIONS
{
. = virtual_base;
_start_text = .;
.text : AT (ADDR(.text) - offset) { *(.text.head) *(.text) }
/* rodata is needed else your strings will link at physical! */
.rodata : AT (ADDR(.rodata) - offset) { *(.rodata) }
.rodata1 : AT (ADDR(.rodata1) - offset) { *(.rodata1) }
.data : AT (ADDR(.data) - offset)
{
. = ALIGN(4K);
_start_test_exec = .;
*(.testexec)
_end_test_exec = .;
*(.data)
}
.bss : AT (ADDR(.bss) - offset) { *(.bss) }
_end = .;
}

View File

@@ -0,0 +1,7 @@
#ifndef __LIBPOSIX_INIT_H__
#define __LIBPOSIX_INIT_H__
void libposix_init(void);
void posix_service_init(void);
#endif /* __LIBPOSIX_INIT_H__ */

View File

@@ -0,0 +1,28 @@
#ifndef __TEST0_TESTS_H__
#define __TEST0_TESTS_H__
#define __TASKNAME__ "test0"
//#define TEST_VERBOSE_PRINT
#if defined (TEST_VERBOSE_PRINT)
#define test_printf(...) printf(__VA_ARGS__)
#else
#define test_printf(...)
#endif
#include <sys/types.h>
extern pid_t parent_of_all;
void ipc_full_test(void);
void ipc_extended_test(void);
int shmtest(void);
int forktest(void);
int mmaptest(void);
int dirtest(void);
int fileio(void);
int clonetest(void);
int exectest(void);
int user_mutex_test(void);
#endif /* __TEST0_TESTS_H__ */