Ignore:
Timestamp:
Dec 17, 1999, 5:56:30 PM (26 years ago)
Author:
sandervl
Message:

remove THDB structure from list when thread ends

File:
1 edited

Legend:

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

    r2085 r2096  
    1 /* $Id: wprocess.cpp,v 1.59 1999-12-16 00:12:55 sandervl Exp $ */
     1/* $Id: wprocess.cpp,v 1.60 1999-12-17 16:56:30 sandervl Exp $ */
    22
    33/*
     
    216216   winteb = (TEB *)*TIBFlatPtr;
    217217   if(winteb) {
    218     thdb = (THDB *)(winteb+1);
    219     orgtibsel = thdb->OrgTIBSel;
    220 
    221     //Restore our original FS selector
     218        thdb = (THDB *)(winteb+1);
     219        orgtibsel = thdb->OrgTIBSel;
     220       
     221        threadListMutex.enter();
     222        THDB *curthdb        = threadList;
     223        if(curthdb == thdb) {
     224                threadList = thdb->next;
     225        }
     226        else {
     227                while(curthdb->next != thdb) {
     228                        curthdb = curthdb->next;
     229                        if(curthdb == NULL) {
     230                                dprintf(("DestroyTIB: couldn't find thdb %x", thdb));
     231                                DebugInt3();
     232                                break;
     233                        }
     234                }
     235                if(curthdb) {
     236                        curthdb->next = thdb->next;
     237                }
     238        }
     239        threadListMutex.leave();
     240
     241        //Restore our original FS selector
    222242        SetFS(orgtibsel);
    223243
     
    673693            lpApplicationName, lpCommandLine, bInheritHandles, dwCreationFlags,
    674694            lpEnvironment, lpCurrentDirectory, lpStartupInfo));
     695
     696    // open32 does not support DEBUG_ONLY_THIS_PROCESS
     697    if(dwCreationFlags & DEBUG_ONLY_THIS_PROCESS)
     698      dwCreationFlags |= DEBUG_PROCESS;
    675699
    676700    if(O32_CreateProcess(lpApplicationName, lpCommandLine, lpProcessAttributes,
Note: See TracChangeset for help on using the changeset viewer.