libmaxsi now has a function called upon process creation.

This commit is contained in:
Jonas 'Sortie' Termansen 2011-09-14 18:11:52 +02:00
parent d3a7b18f69
commit 739b296a95
3 changed files with 47 additions and 3 deletions

View File

@ -40,11 +40,19 @@ c/h/features.h \
c/h/string.h \
c/h/sys/stat.h \
c/h/sys/types.h \
c/h/stdio.h
c/h/stdio.h \
COMMONOBJS=c++.o thread.o io.o memory.o string.o error.o format.o
COMMONOBJS=c++.o memory.o string.o error.o format.o
SORTIXOBJS:=$(addprefix sortix/,$(COMMONOBJS))
LIBMAXSIOBJS:=$(COMMONOBJS) sortix-vga.o sortix-keyboard.o sortix-sound.o process.o
LIBMAXSIOBJS:=$(COMMONOBJS) \
sortix-vga.o \
sortix-keyboard.o \
sortix-sound.o \
process.o \
thread.o \
io.o \
init.o \
HEADERS=\
error.h \
io.h \

34
libmaxsi/init.cpp Normal file
View File

@ -0,0 +1,34 @@
/******************************************************************************
COPYRIGHT(C) JONAS 'SORTIE' TERMANSEN 2011.
This file is part of LibMaxsi.
LibMaxsi is free software: you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option)
any later version.
LibMaxsi is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
more details.
You should have received a copy of the GNU Lesser General Public License
along with LibMaxsi. If not, see <http://www.gnu.org/licenses/>.
init.cpp
Initializes the process by setting up the heap, signal handling,
static memory and other useful things.
******************************************************************************/
#include "platform.h"
namespace Maxsi
{
extern "C" void initialize_standard_library()
{
}
}

View File

@ -30,6 +30,8 @@
.type _start, @function
_start:
call initialize_standard_library
# Run main
# TODO: Sortix should push these values to the stack itself!
push $0x0 # argv