Merge pull request #438 from s4Ys369/revert-434-patch-1
[sm64pc.git] / include / PR / os_cache.h
blob93d53c5f1851c2016cdc02844d14e554f3b08dda
2 /*====================================================================
3 * os_cache.h
5 * Copyright 1995, Silicon Graphics, Inc.
6 * All Rights Reserved.
8 * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics,
9 * Inc.; the contents of this file may not be disclosed to third
10 * parties, copied or duplicated in any form, in whole or in part,
11 * without the prior written permission of Silicon Graphics, Inc.
13 * RESTRICTED RIGHTS LEGEND:
14 * Use, duplication or disclosure by the Government is subject to
15 * restrictions as set forth in subdivision (c)(1)(ii) of the Rights
16 * in Technical Data and Computer Software clause at DFARS
17 * 252.227-7013, and/or in similar or successor clauses in the FAR,
18 * DOD or NASA FAR Supplement. Unpublished - rights reserved under the
19 * Copyright Laws of the United States.
20 *====================================================================*/
22 /*---------------------------------------------------------------------*
23 Copyright (C) 1998 Nintendo. (Originated by SGI)
25 $RCSfile: os_cache.h,v $
26 $Revision: 1.1 $
27 $Date: 1998/10/09 08:01:04 $
28 *---------------------------------------------------------------------*/
30 #ifndef _OS_CACHE_H_
31 #define _OS_CACHE_H_
33 #ifdef _LANGUAGE_C_PLUS_PLUS
34 extern "C" {
35 #endif
37 #include <PR/ultratypes.h>
39 #if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
41 /**************************************************************************
43 * Type definitions
48 #endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
50 /**************************************************************************
52 * Global definitions
57 #if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
59 /**************************************************************************
61 * Macro definitions
65 #define OS_DCACHE_ROUNDUP_ADDR(x) (void *)(((((u32)(x)+0xf)/0x10)*0x10))
66 #define OS_DCACHE_ROUNDUP_SIZE(x) (u32)(((((u32)(x)+0xf)/0x10)*0x10))
69 /**************************************************************************
71 * Extern variables
76 /**************************************************************************
78 * Function prototypes
82 /* Cache operations and macros */
84 extern void osInvalDCache(void *, size_t);
85 extern void osInvalICache(void *, size_t);
86 extern void osWritebackDCache(void *, size_t);
87 extern void osWritebackDCacheAll(void);
90 #endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
92 #ifdef _LANGUAGE_C_PLUS_PLUS
94 #endif
96 #endif /* !_OS_CACHE_H_ */