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

📄 sips.h

📁 一个用在mips体系结构中的操作系统
💻 H
字号:
/* * Copyright (C) 1996-1998 by the Board of Trustees *    of Leland Stanford Junior University. *  * This file is part of the SimOS distribution.  * See LICENSE file for terms of the license.  * *//***************************************************************** * sim_sips.h * * Short Inter-Processor Sends. * * NOTE: The current implementation only provides one SIPS buffer * per node for incoming SIPS. Should be changed to match the * capabilities of the PP. * * Dan Teodosiu, 07/96 * ****************************************************************/#ifndef _SIM_SIPS_H#define _SIM_SIPS_H#include "checkpoint.h"/* number of bytes transmitted in a SIPS*/#define SIPS_SIZE                       128 typedef enum {  SIPS_OK,          /* SIPS has been enqueued */  SIPS_RETRYLOCAL,  /* retry, local resource unavailable */  SIPS_RETRYREMOTE, /* retry, remote resource unavailable */  SIPS_BADDEST,     /* bad destination node (out of range) */  SIPS_REMOTEDEAD   /* remote node is dead, cannot send */} SipsErr;/*** SimOS interface ***/extern void sim_sips_init(int n, void (*int_f)(int n, int lo, int on));extern void sim_sips_deliver(int n, int lo);/* checkpointing utilities required for backward compat with older * SimOS versions. */extern void sim_sips_cpt_from_magic(CptDescriptor* cptd);/*** OS interface ***//* Send a SIPS to the node specified in the message. Note that "n" * is the number of the SENDER (the DESTINATION is in the SIPS itself). * Returns: *  - SIPS_OK: send ok *  - SIPS_RETRY: send failed, please retry *  - SIPS_BADDEST: send failed, bad destination node */extern SipsErr sim_sips_send(int n, int lo, void* data, int delayDelivery);/* Get a SIPS, if there is one pending. Returns: *  - 0: success, got one *  - 1: failed, there is none pending. */extern int     sim_sips_get(int n, int lo, void *data);/* Acknowledge a pending SIPS. The buffer is freed and the interrupt * is cleared as a result. */extern void    sim_sips_ack(int n, int lo);#endif /* _SIM_SIPS_H */

⌨️ 快捷键说明

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