18#include <FreeNOS/System.h>
63 void * arg,
void * dso_handle)
88 for (
void (**ctor)() = &
CTOR_LIST; ctor && *ctor; ctor++)
96 for (
void (**dtor)() = &
DTOR_LIST; dtor && *dtor; dtor++)
196 argv[argc] = arguments;
202 ret =
main(argc, argv);
C void __stack_chk_fail(void)
C void __aeabi_unwind_cpp_pr0()
C int __cxa_atexit(void(*func)(void *), void *arg, void *dso_handle)
C void __cxa_guard_release(u32 *guard)
void(* CTOR_LIST)()
List of constructors.
C int __cxa_guard_acquire(u32 *guard)
void(* DTOR_LIST)()
List of destructors.
Result
Enumeration of generic kernel API result codes.
Memory mapping for the kernel and user processes on the ARM architecture.
static void setDefault(Allocator *alloc)
Makes the given Allocator the default.
Entry * getArray(Size &count)
Get entry table.
void setArray(Entry *array, const Size count)
Assign entry table.
FileSystemClient provides a simple interface to a FileSystemServer.
void setCurrentDirectory(const String &directory)
Set new current directory.
static void * set(void *dest, int ch, unsigned count)
Fill memory with a constant byte.
@ UserArgs
< Used for copying program arguments and file descriptors
Memory::Range range(Region region) const
Get memory range for the given region.
Allocates virtual memory using the memory server.
Memory allocator which uses pools that each manage same-sized objects.
ProcessClient provides information about all processes on the local core.
ProcessID getProcessID() const
Get current process identifier.
Produces random integers using the Linear congruential generator algorithm.
void seed(const ulong value)
Set a value as the current state.
static FileDescriptor * instance()
Retrieve the instance.
C void __cxa_pure_virtual()
Unknown function, required by g++.
API::Result PrivExec(const PrivOperation op, const Address param=0)
Prototype for user applications.
API::Result ProcessCtl(const ProcessID proc, const ProcessOperation op, const Address addr=0, const Address output=0)
Prototype for user applications.
API::Result VMCtl(const ProcessID procID, const MemoryOperation op, Memory::Range *range=ZERO)
Prototype for user applications.
#define PAGESIZE
ARM uses 4K pages.
void clearBSS()
Generic function to clear the BSS memory section to zero.
int main(int argc, char **argv)
Program entry point.
#define ARGV_SIZE
Maximum size of each argument.
#define ARGV_COUNT
Number of arguments at maximum.
u32 ProcessID
Process Identification Number.
unsigned int u32
Unsigned 32-bit number.
unsigned long Address
A memory address.
unsigned int Size
Any sane size indicator cannot go negative.
#define C
Used to define external C functions.
#define SECTION(s)
Can be used to link a symbol inside a specific section.
Describes a range of memory.
Describes a single file opened by a user process.
Size size
Size in number of bytes.
Address phys
Physical address.
Address virt
Virtual address.
Access access
Page access flags.
Timer information structure.