Ignore:
Timestamp:
Oct 27, 1999, 4:03:01 AM (26 years ago)
Author:
bird
Message:

Corrections to make win32k work.
(And now it does work, at least at my test machine...)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/win32k/include/dev32.h

    r1269 r1467  
    1 /* $Id: dev32.h,v 1.2 1999-10-14 01:16:49 bird Exp $
     1/* $Id: dev32.h,v 1.3 1999-10-27 02:02:56 bird Exp $
    22 *
    33 * dev32 - header file for 32-bit part of the driver.
     
    4848 * Function prototypes.
    4949 */
    50 #ifndef __cplusplus
     50#if !defined(__cplusplus) && defined(RING0)
    5151USHORT _loadds _Far32 _Pascal R0Init32(RP32INIT *pRpInit);
    5252USHORT _loadds _Far32 _Pascal GetOTEs32(PKRNLOBJTABLE pOTEBuf);
    5353USHORT _loadds _Far32 _Pascal VerifyProcTab32(void);
    5454#endif
     55#ifdef _OS2Krnl_h_
     56PMTE _System GetOS2KrnlMTE(void); /* (devfirst.asm) */
     57#endif
     58
    5559
    5660/*
    5761 * Global variables
    5862 */
    59 extern ULONG TKSSBase32;
     63extern PULONG pulTKSSBase32;
    6064
    6165/*
    62  * Macros
     66 * SSToDS( stack pointer )
     67 *
     68 * In RING-0 this translates pointers to stack memory in the
     69 * Stack Segment (SS) to pointers to stack memory in the
     70 * Data Segment (DS). SS is 16-bit compatible, DS is 32-bit flat.
     71 * It is vitally important to use this macro whenever creating
     72 * a pointer to stack memory which don't implies that is a pointer
     73 * relative to SS. For example when passing the pointer to an stack
     74 * variable into an function call; like the addToModule calls.
     75 *
     76 * @returns    32-bit FLAT stack pointer.
    6377 */
    64 #define SSToDS(a)   ((PVOID)((ULONG)(a) + TKSSBase32))
     78#ifdef RING0
     79    #define SSToDS(a)   ((PVOID)((ULONG)(a) + *pulTKSSBase32))
     80#else
     81    #define SSToDS(a)   ((PVOID)(a))
     82#endif
    6583
    6684#ifdef __cplusplus
Note: See TracChangeset for help on using the changeset viewer.