FreeNOS
|
CoreClient provides a simple interface to a CoreServer. More...
#include <CoreClient.h>
Public Member Functions | |
CoreClient (const ProcessID pid=CORESRV_PID) | |
Class constructor function. More... | |
Core::Result | getCoreCount (Size &numCores) const |
Get number of processor cores in the system. More... | |
Core::Result | createProcess (const Size coreId, const Address programAddr, const Size programSize, const char *programCmd) const |
Create a new process on a different core. More... | |
Private Member Functions | |
Core::Result | request (CoreMessage &msg) const |
Send an IPC request to the CoreServer. More... | |
Private Attributes | |
const ProcessID | m_pid |
ProcessID of the CoreServer. More... | |
CoreClient provides a simple interface to a CoreServer.
Definition at line 40 of file CoreClient.h.
CoreClient::CoreClient | ( | const ProcessID | pid = CORESRV_PID | ) |
Class constructor function.
pid | Optional ProcessID of the CoreServer. |
Definition at line 22 of file CoreClient.cpp.
Core::Result CoreClient::createProcess | ( | const Size | coreId, |
const Address | programAddr, | ||
const Size | programSize, | ||
const char * | programCmd | ||
) | const |
Create a new process on a different core.
coreId | Specifies the core on which the process will be created. |
programAddr | Virtual address of the loaded program to start. |
programSize | Size of the loaded program in bytes. |
programCmd | Command-line string for starting the program. |
Definition at line 54 of file CoreClient.cpp.
References CoreMessage::action, coreId, CoreMessage::coreNumber, Core::CreateProcess, CoreMessage::programAddr, CoreMessage::programCmd, CoreMessage::programSize, ChannelMessage::Request, request(), and ChannelMessage::type.
Referenced by MpiTarget::initializeMaster(), and MpiProxy::startRemoteProcess().
Core::Result CoreClient::getCoreCount | ( | Size & | numCores | ) | const |
Get number of processor cores in the system.
numCores | On output, contains the number of processor cores. |
Definition at line 39 of file CoreClient.cpp.
References CoreMessage::action, CoreMessage::coreNumber, Core::GetCoreCount, ChannelMessage::Request, request(), Core::Success, and ChannelMessage::type.
Referenced by SysInfo::exec(), and MpiTarget::initializeMaster().
|
inlineprivate |
Send an IPC request to the CoreServer.
msg | Reference to the CoreMessage to send |
Definition at line 27 of file CoreClient.cpp.
References StrictSingleton< ChannelClient >::instance(), Core::IpcError, m_pid, CoreMessage::result, and ChannelClient::Success.
Referenced by createProcess(), and getCoreCount().
|
private |