Ignore:
Timestamp:
May 21, 2002, 2:07:11 PM (23 years ago)
Author:
sandervl
Message:

Round stack top & bottom (TIB) to page boundary

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/wprocess.cpp

    r8401 r8461  
    1 /* $Id: wprocess.cpp,v 1.151 2002-05-10 14:55:13 sandervl Exp $ */
     1/* $Id: wprocess.cpp,v 1.152 2002-05-21 12:07:11 sandervl Exp $ */
    22
    33/*
     
    176176
    177177    winteb->except      = (PVOID)-1;               /* 00 Head of exception handling chain */
     178
    178179    winteb->stack_top   = (PVOID)OSLibGetTIB(TIB_STACKTOP); /* 04 Top of thread stack */
     180    winteb->stack_top   = (PVOID)(((ULONG)winteb->stack_top + 0xFFF) & ~0xFFF);
     181    //round to next page (OS/2 doesn't return a nice rounded value)
    179182    winteb->stack_low   = (PVOID)OSLibGetTIB(TIB_STACKLOW); /* 08 Stack low-water mark */
     183    //round to page boundary (OS/2 doesn't return a nice rounded value)
     184    winteb->stack_low   = (PVOID)((ULONG)winteb->stack_low & ~0xFFF);
    180185    winteb->htask16     = (USHORT)OSLibGetPIB(PIB_TASKHNDL); /* 0c Win16 task handle */
    181186    winteb->stack_sel   = getSS();                 /* 0e 16-bit stack selector */
Note: See TracChangeset for help on using the changeset viewer.