Changeset 3140 for trunk/src


Ignore:
Timestamp:
Mar 17, 2000, 5:08:40 PM (25 years ago)
Author:
sandervl
Message:

fix for handle of thread 0

Location:
trunk/src/kernel32
Files:
6 edited

Legend:

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

    r3128 r3140  
    1 /* $Id: HandleManager.cpp,v 1.36 2000-03-16 19:20:36 sandervl Exp $ */
     1/* $Id: HandleManager.cpp,v 1.37 2000-03-17 16:08:38 sandervl Exp $ */
    22
    33/*
     
    29402940                      LPVOID                 lpvThreadParm,
    29412941                      DWORD                  fdwCreate,
    2942                       LPDWORD                lpIDThread)
     2942                      LPDWORD                lpIDThread,
     2943                      BOOL                   fFirstThread)
    29432944{
    29442945  int             iIndex;                     /* index into the handle table */
     
    29822983  rc = pDeviceHandler->CreateThread(&TabWin32Handles[iIndexNew].hmHandleData,
    29832984                                    lpsa,  cbStack, lpStartAddr,
    2984                                     lpvThreadParm, fdwCreate, lpIDThread);
     2985                                    lpvThreadParm, fdwCreate, lpIDThread, fFirstThread);
    29852986
    29862987  if (rc == 0)     /* oops, creation failed within the device handler */
  • trunk/src/kernel32/hmdevice.cpp

    r3128 r3140  
    1 /* $Id: hmdevice.cpp,v 1.17 2000-03-16 19:20:37 sandervl Exp $ */
     1/* $Id: hmdevice.cpp,v 1.18 2000-03-17 16:08:39 sandervl Exp $ */
    22
    33/*
     
    11891189                                     LPVOID                 lpvThreadParm,
    11901190                                     DWORD                  fdwCreate,
    1191                                      LPDWORD                lpIDThread)
     1191                                     LPDWORD                lpIDThread,
     1192                                     BOOL                   fFirstThread)
    11921193{
    11931194  dprintf(("KERNEL32: ERROR: HandleManager::DeviceHandler::CreateThread %08xh",
  • trunk/src/kernel32/hmdevice.h

    r3128 r3140  
    1 /* $Id: hmdevice.h,v 1.16 2000-03-16 19:20:38 sandervl Exp $ */
     1/* $Id: hmdevice.h,v 1.17 2000-03-17 16:08:39 sandervl Exp $ */
    22
    33/*
     
    309309                             LPVOID                 lpvThreadParm,
    310310                             DWORD                  fdwCreate,
    311                              LPDWORD                lpIDThread);
     311                             LPDWORD                lpIDThread,
     312                             BOOL                   fFirstThread);
    312313
    313314 virtual INT    GetThreadPriority(PHMHANDLEDATA pHMHandleData);
  • trunk/src/kernel32/hmthread.cpp

    r3128 r3140  
    1 /* $Id: hmthread.cpp,v 1.1 2000-03-16 19:21:53 sandervl Exp $ */
     1/* $Id: hmthread.cpp,v 1.2 2000-03-17 16:08:40 sandervl Exp $ */
    22
    33/*
     
    4141                                         LPVOID                 lpvThreadParm,
    4242                                         DWORD                  fdwCreate,
    43                                          LPDWORD                lpIDThread)
     43                                         LPDWORD                lpIDThread,
     44                                         BOOL                   fFirstThread)
    4445{
    4546  Win32Thread *winthread;
    4647
     48  pHMHandleData->dwInternalType = HMTYPE_THREAD;
     49  pHMHandleData->dwUserData     = THREAD_ALIVE;
     50
     51  //SvL: This doesn't really create a thread, but only sets up the
     52  //     handle of thread 0
     53  if(fFirstThread) {
     54        return O32_GetCurrentThread(); //return Open32 handle of thread 0
     55  }
    4756  winthread = new Win32Thread(lpStartAddr, lpvThreadParm, fdwCreate, pHMHandleData->hHMHandle);
    4857
    4958  if(winthread == 0)
    5059    return(0);
    51 
    52   pHMHandleData->dwInternalType = HMTYPE_THREAD;
    53   pHMHandleData->dwUserData     = THREAD_ALIVE;
    5460
    5561#ifdef DEBUG
  • trunk/src/kernel32/hmthread.h

    r3128 r3140  
    1 /* $Id: hmthread.h,v 1.1 2000-03-16 19:21:54 sandervl Exp $ */
     1/* $Id: hmthread.h,v 1.2 2000-03-17 16:08:40 sandervl Exp $ */
    22
    33/*
     
    3030                              LPVOID                 lpvThreadParm,
    3131                              DWORD                  fdwCreate,
    32                               LPDWORD                lpIDThread);
     32                              LPDWORD                lpIDThread,
     33                              BOOL                   fFirstThread);
    3334
    3435  /* this is a handler method for calls to WaitForSingleObject */
  • trunk/src/kernel32/wprocess.cpp

    r3128 r3140  
    1 /* $Id: wprocess.cpp,v 1.73 2000-03-16 19:20:40 sandervl Exp $ */
     1/* $Id: wprocess.cpp,v 1.74 2000-03-17 16:08:40 sandervl Exp $ */
    22
    33/*
     
    138138                return NULL;
    139139        }
    140         HMHandleAllocate(&hThreadMain, O32_GetCurrentThread());
     140        //SvL: This doesn't really create a thread, but only sets up the
     141        //     handle of thread 0
     142        hThreadMain = HMCreateThread(NULL, 0, 0, 0, 0, 0, TRUE);
    141143   }
    142144   if(OSLibAllocSel(PAGE_SIZE, &tibsel) == FALSE)
Note: See TracChangeset for help on using the changeset viewer.