FreeNOS
Data Structures | Macros | Functions
libruntime

This library provides basic runtime support needed to start a program from a main() function. More...

Data Structures

class  CoreClient
 CoreClient provides a simple interface to a CoreServer. More...
 
class  DatastoreClient
 Datastore client. More...
 
class  KernelLog
 Log to the kernel using PrivExec(). More...
 
class  PageAllocator
 Allocates virtual memory using the memory server. More...
 
class  ProcessClient
 ProcessClient provides information about all processes on the local core. More...
 
class  RecoveryClient
 RecoveryClient provides a simple interface to the local core's RecoveryServer. More...
 

Macros

#define ARGV_SIZE   128
 Maximum size of each argument. More...
 
#define ARGV_COUNT   (PAGESIZE / ARGV_SIZE)
 Number of arguments at maximum. More...
 

Functions

int main (int argc, char **argv)
 Program entry point. More...
 

Detailed Description

This library provides basic runtime support needed to start a program from a main() function.

Macro Definition Documentation

◆ ARGV_COUNT

#define ARGV_COUNT   (PAGESIZE / ARGV_SIZE)

Number of arguments at maximum.

Definition at line 36 of file Runtime.h.

◆ ARGV_SIZE

#define ARGV_SIZE   128

Maximum size of each argument.

Definition at line 33 of file Runtime.h.

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Program entry point.

Parameters
argcArgument count.
argvArgument values.
Returns
Exit status.

Program entry point.

Parameters
argcArgument count
argvArgument values
Returns
Zero on success or number of failed tests on failure

Definition at line 20 of file Main.cpp.

References assert, atoi(), LinnGroup::blockMap, LinnSuperBlock::blocksCount, LinnSuperBlock::blockSize, LinnSuperBlock::blocksPerGroup, SystemInformation::coreId, AbstractFactory< SerialDevice >::create(), AbstractFactory< CoreServer >::create(), LinnCreate::create(), LinnSuperBlock::creationTime, errno, ERROR, EXIT_FAILURE, EXIT_SUCCESS, FATAL, fclose(), fopen(), fread(), LinnSuperBlock::freeBlocksCount, LinnGroup::freeBlocksCount, LinnSuperBlock::freeInodesCount, LinnGroup::freeInodesCount, SerialDevice::getIrq(), FileSystemServer::getNextInode(), LinnSuperBlock::groupsTable, Idle, idle, BootSymbolStorage::initialize(), BootImageStorage::initialize(), NetworkServer::initialize(), DeviceServer::initialize(), CoreServer::initialize(), LinnGroup::inodeMap, SerialDevice::inodeNumber, LinnSuperBlock::inodesCount, LinnSuperBlock::inodesPerGroup, LinnGroup::inodeTable, Sun8iEmac::InterruptNumber, LinnSuperBlock::lastCheck, LINN_CREATE_BLOCK_NUM, LINN_CREATE_BLOCK_SIZE, LINN_CREATE_INODE_NUM, LINN_GROUP_COUNT, LINN_GROUP_NUM_BLOCKMAP, LINN_GROUP_NUM_INODEMAP, LINN_GROUP_NUM_INODETAB, LINN_SUPER_MAGIC0, LINN_SUPER_MAGIC1, LINN_SUPER_OFFSET, LINNFS_ROOTFS_FILE, LinnSuperBlock::magic0, LinnSuperBlock::magic1, LinnSuperBlock::majorRevision, LinnSuperBlock::minorRevision, FileSystemServer::mount(), LinnSuperBlock::mountCount, LinnSuperBlock::mountTime, NOTICE, Log::Notice, NULL, printf(), PrivExec(), ProcessCtl(), PS2_IRQ, DeviceServer::registerDevice(), FileSystemServer::registerDirectory(), DeviceServer::registerInterrupt(), NetworkServer::registerNetworkDevice(), TestRunner::run(), Application::run(), ChannelServer< Base, MsgType >::run(), CoreServer::runCore(), Schedule, SEEK_SET, SELF, LinnCreate::setExclude(), LinnCreate::setImage(), LinnCreate::setInput(), Log::setMinimumLogLevel(), LinnCreate::setProgram(), LinnCreate::setVerbose(), LinnSuperBlock::state, strcmp(), strerror(), FileSystem::Success, CoreServer::test(), timeString(), String::toLong(), usage(), FileSystemClient::waitFileSystem(), and ZERO.

Referenced by SECTION().