FreeNOS
CoreClient.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2020 Niek Linnenbank
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#ifndef __LIB_LIBRUNTIME_CORECLIENT_H
19#define __LIB_LIBRUNTIME_CORECLIENT_H
20
21#include <FreeNOS/API/ProcessID.h>
22#include <Types.h>
23#include "Core.h"
24
25struct CoreMessage;
26
41{
42 public:
43
49 CoreClient(const ProcessID pid = CORESRV_PID);
50
58 Core::Result getCoreCount(Size &numCores) const;
59
71 const Address programAddr,
72 const Size programSize,
73 const char *programCmd) const;
74
75 private:
76
85
86 private:
87
90};
91
97#endif /* __LIB_LIBRUNTIME_CORECLIENT_H */
u8 coreId
Definition IntelACPI.h:1
CoreClient provides a simple interface to a CoreServer.
Definition CoreClient.h:41
Core::Result request(CoreMessage &msg) const
Send an IPC request to the CoreServer.
const ProcessID m_pid
ProcessID of the CoreServer.
Definition CoreClient.h:89
Core::Result createProcess(const Size coreId, const Address programAddr, const Size programSize, const char *programCmd) const
Create a new process on a different core.
Core::Result getCoreCount(Size &numCores) const
Get number of processor cores in the system.
#define CORESRV_PID
Definition ProcessID.h:38
u32 ProcessID
Process Identification Number.
Definition Types.h:140
unsigned long Address
A memory address.
Definition Types.h:131
unsigned int Size
Any sane size indicator cannot go negative.
Definition Types.h:128
Result
Result code for Actions.
Definition Core.h:48
Message format for communication with the CoreServer.
Definition CoreMessage.h:39