Changeset 4108 for branches


Ignore:
Timestamp:
Aug 29, 2000, 12:44:25 AM (25 years ago)
Author:
bird
Message:

New import (ptda_ptdasem).
Found and corrected problem with deadlock in myLDRQAppType. (Had to
take the intra-process semaphore (ptda_ptdasem) first.)

Location:
branches
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • branches/GRACE/src/win32k/dev16/probkrnl.c

    r4073 r4108  
    1 /* $Id: probkrnl.c,v 1.20.4.10 2000-08-23 04:25:42 bird Exp $
     1/* $Id: probkrnl.c,v 1.20.4.11 2000-08-28 22:44:19 bird Exp $
    22 *
    33 * Description:   Autoprobes the os2krnl file and os2krnl[*].sym files.
     
    126126    {FALSE, -1, 10, "ptda_start",           -1,  -1,  -1,  -1, EPT_VARIMPORT16},   /* 35 */
    127127    {FALSE, -1, 12, "ptda_environ",         -1,  -1,  -1,  -1, EPT_VARIMPORT16},   /* 36 */
    128     {FALSE, -1, 11, "ptda_module",          -1,  -1,  -1,  -1, EPT_VARIMPORT16},   /* 37 */
    129     {FALSE, -1, 18, "ptda_pBeginLIBPATH",   -1,  -1,  -1,  -1, EPT_VARIMPORT16},   /* 38 */
    130     {FALSE, -1, 16, "_ldrpFileNameBuf",     -1,  -1,  -1,  -1, EPT_VARIMPORT32},   /* 39 */
     128    {FALSE, -1, 12, "ptda_ptdasem",         -1,  -1,  -1,  -1, EPT_VARIMPORT16},   /* 37 */
     129    {FALSE, -1, 11, "ptda_module",          -1,  -1,  -1,  -1, EPT_VARIMPORT16},   /* 38 */
     130    {FALSE, -1, 18, "ptda_pBeginLIBPATH",   -1,  -1,  -1,  -1, EPT_VARIMPORT16},   /* 39 */
     131    {FALSE, -1, 16, "_ldrpFileNameBuf",     -1,  -1,  -1,  -1, EPT_VARIMPORT32},   /* 40 */
    131132
    132133};
     
    16771678        int         i;
    16781679
    1679         printf16("/* $Id: probkrnl.c,v 1.20.4.10 2000-08-23 04:25:42 bird Exp $\n"
     1680        printf16("/* $Id: probkrnl.c,v 1.20.4.11 2000-08-28 22:44:19 bird Exp $\n"
    16801681                 "*\n"
    16811682                 "* Autogenerated kernel symbol database.\n"
  • branches/GRACE/src/win32k/dev32/d32init.c

    r4072 r4108  
    1 /* $Id: d32init.c,v 1.19.4.10 2000-08-23 04:23:33 bird Exp $
     1/* $Id: d32init.c,v 1.19.4.11 2000-08-28 22:44:21 bird Exp $
    22 *
    33 * d32init.c - 32-bits init routines.
     
    11771177        0,                              /* 37 */
    11781178        0,                              /* 38 */
    1179         0                               /* 39 */
     1179        0,                              /* 39 */
     1180        0                               /* 40 */
    11801181    };
    11811182    int i;
     
    14651466        {(unsigned)&fakeptda_start,         4},
    14661467        {(unsigned)&fakeptda_environ,       4},
     1468        {(unsigned)&fakeptda_ptdasem,       4},
    14671469        {(unsigned)&fakeptda_module,        4},
    1468         {(unsigned)&fakeptda_module,        4},
     1470        {(unsigned)&fakeptda_pBeginLIBPATH, 4},
    14691471        {(unsigned)&fakeldrpFileNameBuf,    3}
    14701472    };
  • branches/GRACE/src/win32k/include/OS2KPTDA.h

    r4018 r4108  
    1 /* $Id: OS2KPTDA.h,v 1.1.2.1 2000-08-15 07:03:25 bird Exp $
     1/* $Id: OS2KPTDA.h,v 1.1.2.2 2000-08-28 22:44:22 bird Exp $
    22 *
    33 * PTDA access functions.
     
    5454
    5555
    56 USHORT  ptdaGet_ptda_environ(PPTDA pPTDA);
    57 USHORT  ptdaGet_ptda_module(PPTDA pPTDA);
     56USHORT      ptdaGet_ptda_environ(PPTDA pPTDA);
     57USHORT      ptdaGet_ptda_module(PPTDA pPTDA);
     58HKSEMMTX    ptda_ptda_ptdasem(PPTDA pPTDA);
    5859
    5960#ifdef __cplusplus
  • branches/GRACE/src/win32k/include/OS2KSEM.h

    r4073 r4108  
    1 /* $Id: OS2KSEM.h,v 1.1.2.2 2000-08-23 04:25:44 bird Exp $
     1/* $Id: OS2KSEM.h,v 1.1.2.3 2000-08-28 22:44:22 bird Exp $
    22 *
    33 * OS/2 kernel Semaphore functions.
     
    1616*   Defined Constants And Macros                                               *
    1717*******************************************************************************/
    18 #define KSEM_INDEFINITE_WAIT       -1L
    19 #define KSEM_IMMEDIATE_RETURN       0L
     18#define KSEM_INDEFINITE_WAIT       -1UL
     19#define KSEM_IMMEDIATE_RETURN       0UL
    2020
    2121/*
  • branches/GRACE/src/win32k/include/probkrnl.h

    r4068 r4108  
    1 /* $Id: probkrnl.h,v 1.13.4.7 2000-08-22 03:00:20 bird Exp $
     1/* $Id: probkrnl.h,v 1.13.4.8 2000-08-28 22:44:23 bird Exp $
    22 *
    33 * Include file for ProbKrnl.
     
    1616*   Defined Constants And Macros                                               *
    1717*******************************************************************************/
    18 #define NBR_OF_KRNLIMPORTS      40      /* When this is changed make sure to   */
     18#define NBR_OF_KRNLIMPORTS      41      /* When this is changed make sure to   */
    1919                                        /* update the arrays in d32init.c and  */
    20                                         /* probkrnl.c */
     20                                        /* probkrnl.c, make test faker in      */
     21                                        /* test.h and the appropriate fake.c   */
     22                                        /* fakea.asm.                          */
    2123#define MAX_LENGTH_NAME         32      /* Max length for the function. */
    2224
  • branches/GRACE/src/win32k/include/test.h

    r4070 r4108  
    1 /* $Id: test.h,v 1.1.4.6 2000-08-23 04:14:58 bird Exp $
     1/* $Id: test.h,v 1.1.4.7 2000-08-28 22:44:23 bird Exp $
    22 *
    33 * Definitions and declarations for test moduls.
     
    117117extern char     fakeptda_start;
    118118extern USHORT   fakeptda_environ;
     119extern KSEMMTX  fakeptda_ptdasem;
    119120extern HMTE     fakeptda_module;
    120121extern PSZ      fakeldrpFileNameBuf;
  • branches/GRACE/src/win32k/ldr/myldrOpen.cpp

    r4103 r4108  
    1 /* $Id: myldrOpen.cpp,v 1.10.4.7 2000-08-28 11:31:45 bird Exp $
     1/* $Id: myldrOpen.cpp,v 1.10.4.8 2000-08-28 22:44:24 bird Exp $
    22 *
    33 * myldrOpen - ldrOpen.
     
    583583            && isLdrStateLoadingEXE()
    584584            && (isLdrStateQAppType() || isLdrStateExecPgm())
    585             && (stricmp(psz2, ".RX") == 0 || stricmp(psz2, ".REX"))
     585            && (stricmp(psz2, ".RX") == 0 || stricmp(psz2, ".REX") == 0)
    586586            )
    587587        {
  • branches/GRACE/src/win32k/misc/OS2KPTDA.c

    r4025 r4108  
    1 /* $Id: OS2KPTDA.c,v 1.1.2.2 2000-08-17 08:23:35 bird Exp $
     1/* $Id: OS2KPTDA.c,v 1.1.2.3 2000-08-28 22:44:24 bird Exp $
    22 *
    33 * PTDA access functions.
     
    99 */
    1010
     11/*******************************************************************************
     12*   Defined Constants And Macros                                               *
     13*******************************************************************************/
     14#define INCL_OS2KRNL_SEM
     15#define INCL_OS2KRNL_PTDA
    1116
    1217/*******************************************************************************
     
    1419*******************************************************************************/
    1520#include <os2.h>
    16 #include <OS2KPTDA.h>
     21#include <OS2Krnl.h>
    1722
    1823
     
    2833extern ULONG    pptda_start;
    2934extern ULONG    pptda_environ;
     35extern ULONG    pptda_ptdasem;
    3036extern ULONG    pptda_module;
    3137
     
    5561
    5662
     63/**
     64 * Gets the ptda_ptdasem PTDA member. This member holds the intra-process semaphore which
     65 * for example is used to serialize _LDRQAppType.
     66 * @returns     Content of the pPTDA->ptda_ptdasem member.
     67 * @param       pPTDA   PTDA Pointer. (NULL is not allowed!)
     68 */
     69HKSEMMTX    ptda_ptda_ptdasem(PPTDA pPTDA)
     70{
     71    return (HKSEMMTX)(void*)(((char*)(void*)pPTDA) + (pptda_ptdasem - pptda_start));
     72}
    5773
    5874
  • branches/Grace/src/win32k/include/OS2Krnl.h

    r3834 r4108  
    1 /* $Id: OS2Krnl.h,v 1.7.4.1 2000-07-16 22:43:27 bird Exp $
     1/* $Id: OS2Krnl.h,v 1.7.4.2 2000-08-28 22:44:22 bird Exp $
    22 *
    33 * OS/2 kernel structures, typedefs and macros.
     
    243243#endif
    244244
     245#if defined(INCL_OS2KRNL_PTDA) && !defined(INCL_OS2KRNL_SEM)
     246    #define INCL_OS2KRNL_SEM
     247#endif
     248
    245249#ifdef INCL_OS2KRNL_IO
    246250    #include <OS2KIO.h>
  • branches/Grace/src/win32k/ldr/calltab.asm

    r4071 r4108  
    1 ; $Id: calltab.asm,v 1.12.4.7 2000-08-23 04:16:43 bird Exp $
     1; $Id: calltab.asm,v 1.12.4.8 2000-08-28 22:44:23 bird Exp $
    22;
    33; callTab - Call back again table - table with entry for each function or
     
    8686    public ptda_environ_sel
    8787
     88    public pptda_ptdasem
     89    public ptda_ptdasem_offObject
     90    public _fpptda_ptdasem
     91    public ptda_ptdasem_sel
     92
    8893    public pptda_module
    8994    public ptda_module_offObject
     
    320325
    321326; 37
     327pptda_ptdasem          dd  0
     328ptda_ptdasem_offObject dd  0
     329_fpptda_ptdasem        dd  0
     330ptda_ptdasem_sel       dw  0
     331    db (MAXSIZE_PROLOG - 14) dup(0cch)
     332
     333; 38
    322334pptda_module          dd  0
    323335ptda_module_offObject dd  0
     
    326338    db (MAXSIZE_PROLOG - 14) dup(0cch)
    327339
    328 ; 38
     340; 39
    329341pptda_pBeginLIBPATH           dd  0
    330342ptda_pBeginLIBPATH_offObject  dd  0
     
    333345    db (MAXSIZE_PROLOG - 14) dup(0cch)
    334346
    335 
    336 ; 39
     347; 40
    337348pldrpFileNameBuf              dd  0
    338349pldrpFileNameBuf_offObject    dd  0
  • branches/Grace/src/win32k/ldr/myLDRQAppType.cpp

    r4046 r4108  
    1 /* $Id: myLDRQAppType.cpp,v 1.3.4.2 2000-08-19 14:37:14 bird Exp $
     1/* $Id: myLDRQAppType.cpp,v 1.3.4.3 2000-08-28 22:44:24 bird Exp $
    22 *
    33 * _myLDRQAppType - _LDRQAppType overload.
     
    1515#define INCL_NOPMAPI
    1616
     17#define INCL_OS2KRNL_PTDA
    1718#define INCL_OS2KRNL_SEM
    1819
     
    4647
    4748    kprintf(("myLDRQAppType: entry\n"));
    48 
     49    rc = KSEMRequestMutex(ptda_ptda_ptdasem(ptdaGetCur()), KSEM_INDEFINITE_WAIT);
     50    if (rc != NO_ERROR)
     51    {
     52        kprintf(("myLDRQAppType: failed to get intra-process semaphore.\n"));
     53        return rc;
     54    }
    4955    rc = LDRRequestSem();
    5056    if (rc != NO_ERROR)
     
    6369
    6470    LDRClearSem();
     71    KSEMReleaseMutex(ptda_ptda_ptdasem(ptdaGetCur()));
    6572    kprintf(("myLDRQAppType: exit\n"));
    6673
  • branches/Grace/src/win32k/test/fakea.asm

    r4090 r4108  
    1 ; $Id: fakea.asm,v 1.1.4.5 2000-08-25 04:47:28 bird Exp $
     1; $Id: fakea.asm,v 1.1.4.6 2000-08-28 22:44:25 bird Exp $
    22;
    33; Fake assembly imports.
     
    3131    public fakeptda_environ
    3232    public fakeptda_module
     33    public fakeptda_ptdasem
     34    public fakeptda_pBeginLIBPATH
    3335    public fakef_FuStrLenZ
    3436    public fakef_FuStrLen
     
    6062fakeptda_dummy              db  123 dup (0)
    6163fakeptda_environ            dw      1   ; 1 is the hardcoded HOB of the win32ktst.exe's environment.
     64fakeptda_ptda_sem           db  20  dup (0) ; PTDA semaphore - Intra-Process serialisation mutex KSEM (sg244640).
    6265fakeptda_module             dw      1   ; 1 is the hardcoded HMTE of the current executable module.
    6366fakeptda_pBeginLIBPATH      dd      0   ; BEGINLIBPATH not implemented.
Note: See TracChangeset for help on using the changeset viewer.