| 1 | /* $Id: krnlPrivate.h,v 1.5 2002-12-19 01:49:06 bird Exp $
|
|---|
| 2 | *
|
|---|
| 3 | * Private header file for the krnl part.
|
|---|
| 4 | *
|
|---|
| 5 | * Copyright (c) 2001-2003 knut st. osmundsen <bird@anduin.net>
|
|---|
| 6 | *
|
|---|
| 7 | *
|
|---|
| 8 | * This file is part of kKrnlLib.
|
|---|
| 9 | *
|
|---|
| 10 | * kKrnlLib is free software; you can redistribute it and/or modify
|
|---|
| 11 | * it under the terms of the GNU General Public License as published by
|
|---|
| 12 | * the Free Software Foundation; either version 2 of the License, or
|
|---|
| 13 | * (at your option) any later version.
|
|---|
| 14 | *
|
|---|
| 15 | * kKrnlLib is distributed in the hope that it will be useful,
|
|---|
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 18 | * GNU General Public License for more details.
|
|---|
| 19 | *
|
|---|
| 20 | * You should have received a copy of the GNU General Public License
|
|---|
| 21 | * along with kKrnlLib; if not, write to the Free Software
|
|---|
| 22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|---|
| 23 | *
|
|---|
| 24 | */
|
|---|
| 25 |
|
|---|
| 26 | #ifndef _krnlPrivate_h_
|
|---|
| 27 | #define _krnlPrivate_h_
|
|---|
| 28 |
|
|---|
| 29 | /*******************************************************************************
|
|---|
| 30 | * Defined Constants And Macros *
|
|---|
| 31 | *******************************************************************************/
|
|---|
| 32 | #define IMPORT_LOCK() KSEMRequestMutex(&kmtxImports, KSEM_INDEFINITE_WAIT)
|
|---|
| 33 | #define IMPORT_UNLOCK() KSEMReleaseMutex(&kmtxImports)
|
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 | /*******************************************************************************
|
|---|
| 37 | * Global Variables *
|
|---|
| 38 | *******************************************************************************/
|
|---|
| 39 | #ifdef _OS2KSEM_h_
|
|---|
| 40 | extern KSEMMTX kmtxImports;
|
|---|
| 41 | #endif
|
|---|
| 42 |
|
|---|
| 43 | extern char KKL_EntryTab[1]; /* calltaba.asm */
|
|---|
| 44 | extern char KKL_EntryTabEND[1]; /* calltaba.asm */
|
|---|
| 45 | extern char KKL_EntryTabFixups[1]; /* calltaba.asm */
|
|---|
| 46 | #ifdef _OS2KLDR_H_
|
|---|
| 47 | extern MTE kKrnlLibMTE; /* calltaba.asm */
|
|---|
| 48 | extern SMTE KKL_SwapMTE; /* calltaba.asm */
|
|---|
| 49 | extern OTE KKL_ObjTab[4]; /* calltaba.asm */
|
|---|
| 50 | extern OTE KKL_ObjTab_DosCalls[20]; /* calltaba.asm */
|
|---|
| 51 | extern PMTE pKrnlMTE; /* krnlInit.c */
|
|---|
| 52 | extern PSMTE pKrnlSMTE; /* krnlInit.c */
|
|---|
| 53 | extern POTE pKrnlOTE; /* krnlInit.c */
|
|---|
| 54 | extern int cKernelObjects; /* krnlInit.c */
|
|---|
| 55 | #endif
|
|---|
| 56 | extern char KKL_ResNameTab[1]; /* calltaba.asm */
|
|---|
| 57 | extern char KKL_ResNameTabEND[1]; /* calltaba.asm */
|
|---|
| 58 | extern char callTab[1]; /* calltaba.asm */
|
|---|
| 59 | extern char callTabEND[1]; /* calltaba.asm */
|
|---|
| 60 | extern char callTab16[1]; /* calltaba.asm */
|
|---|
| 61 | extern char callTab16END[1]; /* calltaba.asm */
|
|---|
| 62 | extern unsigned auNopFuncs[NBR_OF_KRNLIMPORTS]; /* calltaba.asm */
|
|---|
| 63 |
|
|---|
| 64 |
|
|---|
| 65 |
|
|---|
| 66 | /*******************************************************************************
|
|---|
| 67 | * Functions *
|
|---|
| 68 | *******************************************************************************/
|
|---|
| 69 | extern void _Optlink krnlLockedWrite(unsigned long ulAddr, unsigned char chOpcode, unsigned long ulDword);
|
|---|
| 70 | extern int _System krnlMakeCalltab16CodeSegment(void);
|
|---|
| 71 | extern int krnlLoadKernelSym(void);
|
|---|
| 72 | extern int krnlVerifyImportTab(void);
|
|---|
| 73 | #ifdef _OS2KLDR_H_
|
|---|
| 74 | extern int krnlLoadKernelSymFile(const char *pszFilename, POTE paOTEs, int cOTEs);
|
|---|
| 75 | extern PMTE _System krnlGetOS2KrnlMTE(void);
|
|---|
| 76 | #endif
|
|---|
| 77 | extern int krnlInterpretProlog32(char *pach);
|
|---|
| 78 | extern int krnlInterpretProlog16(char *pach);
|
|---|
| 79 |
|
|---|
| 80 |
|
|---|
| 81 | #endif
|
|---|