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