⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ipc.h

📁 一个操作系统的源代码
💻 H
字号:
/** ipc.h ** ** Original Author: Guido de Jong ** Date: 01/06/99 ** ** Description: ** Interprocess Communication **  ** This program is free software, you can redistribute it and/or ** modify it under the terms of the GNU General Public License ** as published by the Free Software Foundation; either version ** 2 of the License, or (at your option) any later version. ** ** This program is distributed in the hope that it will be ** useful, but WITHOUT ANY WARRANTY; without even the implied ** warranty or MERCHANTABILITY or FITNESS FOR A PARTICULAR ** PURPOSE.  See the GNU General Public License for more ** details. ** ** You should have received a copy of the GNU General Public ** License along with this program; if not, write to the ** Free Software Foundation, Inc., 59 Temple Place, Suite 330, ** Boston, MA 02111-1307 USA ** *********************************************************Apostle OS**/#ifndef __IPC_H_#define __IPC_H_#include <address_space.h>#include <process.h>/* IPC option types *//* Send options */#define IPC_SND_WAIT4EVER 0x0001#define IPC_SND_REGISTERS 0x0002#define IPC_SND_MEMORY    0x0004#define IPC_SND_IO        0x0008/* only applicable for type memory */#define IPC_SND_MAPPING   0x0010#define IPC_SND_GRANTING  0x0020#define IPC_SND_READ_ONLY 0x0040#define IPC_SND_NO_ACCESS 0x0080/* Receive options */#define IPC_RCV_WAIT4EVER 0x0100#define IPC_RCV_REGISTERS 0x0200#define IPC_RCV_MEMORY    0x0400#define IPC_RCV_IO        0x0800/* only applicable for type memory */#define IPC_RCV_MAPPING   0x1000#define IPC_RCV_GRANTING  0x2000#define IPC_RCV_READ_ONLY 0x4000#define IPC_RCV_NO_ACCESS 0x8000#define IPC_CALL_REMOTE   0x80000000/* convert send & receive options * NOTE: WAIT4EVER is always cleared! */#define IPC_SND_RCV(x) ((x & 0xfe) << 8)#define IPC_RCV_SND(x) ((x >> 8) & 0xfe)/* IPC return values */#define IPC_REGISTERS_OK 0x01#define IPC_MEMORY_OK    0x02#define IPC_IO_OK        0x04#define IPC_CALL_OK      0x08/* Assign options */#define ASSIGN_MAPPING   0x0001#define ASSIGN_GRANTING  0x0002#define ASSIGN_READ_ONLY 0x0004#define ASSIGN_NO_ACCESS 0x0008/* Unmap options */#define UNMAP_PARTIAL 0x01#define UNMAP_METOO   0x02typedef dword IPC_Options;int SendTo(dword eax, dword edx, dword ecx, dword ebx,           dword ebp, dword esi, dword edi);int ReceiveFrom(dword eax, dword edx, dword ecx, dword ebx,                dword ebp, dword esi, dword edi);int CallRemote(dword eax, dword edx, dword ecx, dword ebx,               dword ebp, dword esi, dword edi);int SendReceive(dword eax, dword edx, dword ecx, dword ebx,                dword ebp, dword esi, dword edi);#endif /* __IPC_H_ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -