KENSv3
KAIST Educational Network System
Public Member Functions | Protected Member Functions | Friends | List of all members
E::SystemCallApplication Class Referenceabstract

This provides system call interface to an application. This provides basic system call invoking mechanism to the application. More...

#include <E_Host.hpp>

Inheritance diagram for E::SystemCallApplication:
E::Runnable E::TCPApplication EchoAssignment TestBind_DifferentIP_SamePort TestBind_DoubleBind TestBind_GetSockName TestBind_OverlapClosed TestBind_OverlapPort TestBind_SameIP_DifferentPort TestBind_Simple TestClose_Accept TestClose_Connect TestCongestion_Accept TestCongestion_Connect TestHandshake_Accept TestHandshake_Connect TestHandshake_SimultaneousConnect TestOpen TestTransfer_Accept TestTransfer_Connect

Public Member Functions

 SystemCallApplication (Host &host)
 
- Public Member Functions inherited from E::Runnable
virtual void start () final
 Start and prepare (CREATED -> READY)
 
virtual State wake () final
 Wake and keep running (READY -> RUNNING) More...
 
virtual void ready () final
 Mark ready (WAITING -> READY)
 

Protected Member Functions

virtual void initialize () final
 Standard C++11 thread is automatically launched, so we cannot control the starting time. Calling this function guarantees that E_Main thread is successfully launched.
 
virtual int E_Syscall (const SystemCallInterface::SystemCallParameter &param) final
 This is equivalent to INT 0x80 instruction of Linux. This function may be blocked if the system call is blocking call. More...
 
virtual void returnSyscall (int retVal) final
 
virtual int E_Main ()=0
 This does a role of int main(int argc, char** argv, char** env). The main functions of multiple applications run in parallel. More...
 
Time getCurrentTime ()
 
- Protected Member Functions inherited from E::Runnable
 Runnable ()
 Constructs a Runnable interface.
 
virtual void wait () final
 Enter wait state (RUNNING -> WAITING)
 
virtual void pre_main ()
 Prepare logic.
 
virtual void run () final
 Thread code.
 

Friends

class Host
 
class TCPApplication
 

Additional Inherited Members

- Public Types inherited from E::Runnable
enum class  State {
  CREATED , STARTING , READY , RUNNING ,
  WAITING , TERMINATED
}
 

Detailed Description

This provides system call interface to an application. This provides basic system call invoking mechanism to the application.

See also
TCPApplication

Member Function Documentation

◆ E_Main()

virtual int E::SystemCallApplication::E_Main ( )
protectedpure virtual

This does a role of int main(int argc, char** argv, char** env). The main functions of multiple applications run in parallel.

Parameters
paramParameters for system call.
Note
You cannot override this function.

Implemented in TestTransfer_Connect, TestTransfer_Accept, TestOpen, TestHandshake_SimultaneousConnect, TestHandshake_Connect, TestHandshake_Accept, TestCongestion_Connect, TestCongestion_Accept, TestClose_Connect, TestClose_Accept, TestBind_SameIP_DifferentPort, TestBind_DifferentIP_SamePort, TestBind_OverlapClosed, TestBind_OverlapPort, TestBind_GetSockName, TestBind_DoubleBind, TestBind_Simple, and EchoAssignment.

◆ E_Syscall()

int E::SystemCallApplication::E_Syscall ( const SystemCallInterface::SystemCallParameter param)
finalprotectedvirtual

This is equivalent to INT 0x80 instruction of Linux. This function may be blocked if the system call is blocking call.

Parameters
paramParameters for system call.
Note
You cannot override this function.

◆ getCurrentTime()

Time E::SystemCallApplication::getCurrentTime ( )
protected
Returns
Returns current virtual clock of the System.

The documentation for this class was generated from the following files: