mirror of
https://github.com/zeldaret/af.git
synced 2026-10-02 23:55:09 -04:00
d66a21685f
* git subrepo clone git@github.com:ethteck/splat.git tools/splat subrepo: subdir: "tools/splat" merged: "4fec014" upstream: origin: "git@github.com:ethteck/splat.git" branch: "master" commit: "4fec014" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * gitignore * decompress_baserom.py * Initial yaml * run flib * more yaml stuff * Builds an uncompressed ROM * setup ido download * git subrepo clone git@github.com:simonlindholm/asm-differ.git tools/asm-differ subrepo: subdir: "tools/asm-differ" merged: "ae40866" upstream: origin: "git@github.com:simonlindholm/asm-differ.git" branch: "main" commit: "ae40866" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * git subrepo clone git@github.com:simonlindholm/asm-processor.git tools/asm-processor subrepo: subdir: "tools/asm-processor" merged: "bbd86ea" upstream: origin: "git@github.com:simonlindholm/asm-processor.git" branch: "main" commit: "bbd86ea" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * git subrepo clone (merge) git@github.com:EllipticEllipsis/fado.git tools/fado subrepo: subdir: "tools/fado" merged: "8d896ee" upstream: origin: "git@github.com:EllipticEllipsis/fado.git" branch: "master" commit: "8d896ee" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * setup ido in makefile * data and rodata * add automatic file splits * bootstrap most symbol_addrs * git subrepo clone --branch=irix git@github.com:hensldm/ultralib.git lib/ultralib subrepo: subdir: "lib/ultralib" merged: "0d1e095" upstream: origin: "git@github.com:hensldm/ultralib.git" branch: "irix" commit: "0d1e095" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * setup ido building * various tooling * git subrepo pull tools/asm-differ subrepo: subdir: "tools/asm-differ" merged: "857b398" upstream: origin: "git@github.com:simonlindholm/asm-differ.git" branch: "main" commit: "857b398" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * Change defines to match IDO * review * newlin * update gitignore * Windows error * D_01000000 * yeet settings.json * yeet * git subrepo clone git@github.com:decompals/ultralib.git lib/ultralib subrepo: subdir: "lib/ultralib" merged: "d03b2a3" upstream: origin: "git@github.com:decompals/ultralib.git" branch: "main" commit: "d03b2a3" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * clangformat and clangtidy * Setup a bunch of headers * bootstrap boot and code functions and variables headers * global.h * update format.py includes * -D_MIPS_SZLONG=32 * format.py: --verbose * Update tools/decompress_baserom.py Co-authored-by: Derek Hensley <hensley.derek58@gmail.com> * Add libc to global.h * review * yeet saved_regs * yeet headers * yeet _MSC_VER * more header cleanup * add readme licensing note --------- Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
163 lines
5.2 KiB
C
163 lines
5.2 KiB
C
|
|
/*====================================================================
|
|
* os_message.h
|
|
*
|
|
* Copyright 1995, Silicon Graphics, Inc.
|
|
* All Rights Reserved.
|
|
*
|
|
* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics,
|
|
* Inc.; the contents of this file may not be disclosed to third
|
|
* parties, copied or duplicated in any form, in whole or in part,
|
|
* without the prior written permission of Silicon Graphics, Inc.
|
|
*
|
|
* RESTRICTED RIGHTS LEGEND:
|
|
* Use, duplication or disclosure by the Government is subject to
|
|
* restrictions as set forth in subdivision (c)(1)(ii) of the Rights
|
|
* in Technical Data and Computer Software clause at DFARS
|
|
* 252.227-7013, and/or in similar or successor clauses in the FAR,
|
|
* DOD or NASA FAR Supplement. Unpublished - rights reserved under the
|
|
* Copyright Laws of the United States.
|
|
*====================================================================*/
|
|
|
|
/*---------------------------------------------------------------------*
|
|
Copyright (C) 1998 Nintendo. (Originated by SGI)
|
|
|
|
$RCSfile: os_message.h,v $
|
|
$Revision: 1.1 $
|
|
$Date: 1998/10/09 08:01:15 $
|
|
*---------------------------------------------------------------------*/
|
|
|
|
#ifndef _OS_MESSAGE_H_
|
|
#define _OS_MESSAGE_H_
|
|
|
|
#ifdef _LANGUAGE_C_PLUS_PLUS
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include "ultratypes.h"
|
|
#include "os_thread.h"
|
|
|
|
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
|
|
|
|
/**************************************************************************
|
|
*
|
|
* Type definitions
|
|
*
|
|
*/
|
|
|
|
typedef u32 OSEvent;
|
|
|
|
/*
|
|
* Structure for message
|
|
*/
|
|
typedef void *OSMesg;
|
|
|
|
/*
|
|
* Structure for message queue
|
|
*/
|
|
typedef struct OSMesgQueue_s {
|
|
OSThread *mtqueue; /* Queue to store threads blocked on empty mailboxes (receive) */
|
|
OSThread *fullqueue; /* Queue to store threads blocked on full mailboxes (send) */
|
|
s32 validCount; /* Contains number of valid message */
|
|
s32 first; /* Points to first valid message */
|
|
s32 msgCount; /* Contains total # of messages */
|
|
OSMesg *msg; /* Points to message buffer array */
|
|
} OSMesgQueue;
|
|
|
|
|
|
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
|
|
|
|
/**************************************************************************
|
|
*
|
|
* Global definitions
|
|
*
|
|
*/
|
|
|
|
/* Events */
|
|
#ifdef _FINALROM
|
|
#define OS_NUM_EVENTS 15
|
|
#else
|
|
#define OS_NUM_EVENTS 23
|
|
#endif
|
|
|
|
#define OS_EVENT_SW1 0 /* CPU SW1 interrupt */
|
|
#define OS_EVENT_SW2 1 /* CPU SW2 interrupt */
|
|
#define OS_EVENT_CART 2 /* Cartridge interrupt: used by rmon */
|
|
#define OS_EVENT_COUNTER 3 /* Counter int: used by VI/Timer Mgr */
|
|
#define OS_EVENT_SP 4 /* SP task done interrupt */
|
|
#define OS_EVENT_SI 5 /* SI (controller) interrupt */
|
|
#define OS_EVENT_AI 6 /* AI interrupt */
|
|
#define OS_EVENT_VI 7 /* VI interrupt: used by VI/Timer Mgr */
|
|
#define OS_EVENT_PI 8 /* PI interrupt: used by PI Manager */
|
|
#define OS_EVENT_DP 9 /* DP full sync interrupt */
|
|
#define OS_EVENT_CPU_BREAK 10 /* CPU breakpoint: used by rmon */
|
|
#define OS_EVENT_SP_BREAK 11 /* SP breakpoint: used by rmon */
|
|
#define OS_EVENT_FAULT 12 /* CPU fault event: used by rmon */
|
|
#define OS_EVENT_THREADSTATUS 13 /* CPU thread status: used by rmon */
|
|
#define OS_EVENT_PRENMI 14 /* Pre NMI interrupt */
|
|
#ifndef _FINALROM
|
|
#define OS_EVENT_RDB_READ_DONE 15 /* RDB read ok event: used by rmon */
|
|
#define OS_EVENT_RDB_LOG_DONE 16 /* read of log data complete */
|
|
#define OS_EVENT_RDB_DATA_DONE 17 /* read of hostio data complete */
|
|
#define OS_EVENT_RDB_REQ_RAMROM 18 /* host needs ramrom access */
|
|
#define OS_EVENT_RDB_FREE_RAMROM 19 /* host is done with ramrom access */
|
|
#define OS_EVENT_RDB_DBG_DONE 20
|
|
#define OS_EVENT_RDB_FLUSH_PROF 21
|
|
#define OS_EVENT_RDB_ACK_PROF 22
|
|
#endif
|
|
|
|
/* Flags to turn blocking on/off when sending/receiving message */
|
|
|
|
#define OS_MESG_NOBLOCK 0
|
|
#define OS_MESG_BLOCK 1
|
|
|
|
|
|
#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
|
|
|
|
/**************************************************************************
|
|
*
|
|
* Macro definitions
|
|
*
|
|
*/
|
|
|
|
/* Get count of valid messages in queue */
|
|
#define MQ_GET_COUNT(mq) ((mq)->validCount)
|
|
|
|
/* Figure out if message queue is empty or full */
|
|
#define MQ_IS_EMPTY(mq) (MQ_GET_COUNT(mq) == 0)
|
|
#define MQ_IS_FULL(mq) (MQ_GET_COUNT(mq) >= (mq)->msgCount)
|
|
|
|
|
|
/**************************************************************************
|
|
*
|
|
* Extern variables
|
|
*
|
|
*/
|
|
|
|
|
|
/**************************************************************************
|
|
*
|
|
* Function prototypes
|
|
*
|
|
*/
|
|
|
|
/* Message operations */
|
|
|
|
extern void osCreateMesgQueue(OSMesgQueue *, OSMesg *, s32);
|
|
extern s32 osSendMesg(OSMesgQueue *, OSMesg, s32);
|
|
extern s32 osJamMesg(OSMesgQueue *, OSMesg, s32);
|
|
extern s32 osRecvMesg(OSMesgQueue *, OSMesg *, s32);
|
|
|
|
/* Event operations */
|
|
|
|
extern void osSetEventMesg(OSEvent, OSMesgQueue *, OSMesg);
|
|
|
|
|
|
#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
|
|
|
|
#ifdef _LANGUAGE_C_PLUS_PLUS
|
|
}
|
|
#endif
|
|
|
|
#endif /* !_OS_MESSAGE_H_ */
|