Changeset 5016 for trunk/src/kernel32


Ignore:
Timestamp:
Jan 23, 2001, 12:59:45 PM (25 years ago)
Author:
sandervl
Message:

vio, thread exit fixes

Location:
trunk/src/kernel32
Files:
4 edited

Legend:

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

    r5011 r5016  
    1 /* $Id: HandleManager.cpp,v 1.60 2001-01-22 18:26:49 sandervl Exp $ */
     1/* $Id: HandleManager.cpp,v 1.61 2001-01-23 11:59:44 sandervl Exp $ */
    22
    33/*
     
    694694  return(TabWin32Handles[hHandle16].hmHandleData.hHMHandle);
    695695}
    696 
    697 
    698696
    699697/*****************************************************************************
     
    44644462  if (-1 == iIndexNewWrite)                         /* oops, no free handles ! */
    44654463  {
    4466     //free handle
    4467     TabWin32Handles[iIndexNewRead].hmHandleData.hHMHandle = INVALID_HANDLE_VALUE;
     4464    HMHandleFree(iIndexNewRead);
    44684465    SetLastError(ERROR_NOT_ENOUGH_MEMORY);      /* use this as error message */
    44694466    return 0;
     
    45114508  if (rc == 0)     /* oops, creation failed within the device handler */
    45124509  {
    4513       TabWin32Handles[iIndexNewRead].hmHandleData.hHMHandle = INVALID_HANDLE_VALUE;
    4514       TabWin32Handles[iIndexNewWrite].hmHandleData.hHMHandle = INVALID_HANDLE_VALUE;
    4515   return FALSE;                                           /* signal error */
     4510      HMHandleFree(iIndexNewRead);
     4511      HMHandleFree(iIndexNewWrite);
     4512      return FALSE;                                           /* signal error */
    45164513  }
    45174514
  • trunk/src/kernel32/conbuffervio.cpp

    r4523 r5016  
    1 /* $Id: conbuffervio.cpp,v 1.2 2000-10-23 13:42:40 sandervl Exp $ */
     1/* $Id: conbuffervio.cpp,v 1.3 2001-01-23 11:59:45 sandervl Exp $ */
    22
    33/*
     
    220220            dprintf(("LF"));
    221221            pConsoleBuffer->coordCursorPosition.Y++;
     222            pConsoleBuffer->coordCursorPosition.X = 0;
    222223            if(pConsoleBuffer->coordCursorPosition.Y >= pConsoleBuffer->coordWindowSize.Y) {
    223224                dprintf(("scrollup"));
  • trunk/src/kernel32/oslibdos.cpp

    r4862 r5016  
    1 /* $Id: oslibdos.cpp,v 1.55 2000-12-31 12:28:54 sandervl Exp $ */
     1/* $Id: oslibdos.cpp,v 1.56 2001-01-23 11:59:45 sandervl Exp $ */
    22/*
    33 * Wrappers for OS/2 Dos* API
     
    16871687}
    16881688
     1689// TODO: not finished nor correct!!!!
    16891690VOID long2ShortName(CHAR* longName, CHAR* shortName)
    16901691{
     
    17291730       x++)
    17301731  {
    1731     switch (*source++)
     1732    switch (*source)
    17321733    {
    17331734      case '.': // a period will cause the loop to abort!
     
    17411742        flag83 = FALSE;
    17421743        break;
     1744      default:
     1745        source++;
     1746        break;
    17431747    }
    17441748  }
     
    17471751  if (flag83 == TRUE)
    17481752    if (*source != '.')
    1749       flag83 = FALSE;
     1753         flag83 = FALSE;
     1754    else source++;
    17501755 
    17511756  // verify extension
     
    17641769          break;
    17651770      }
     1771      source++;
    17661772    }
    17671773 
     
    17771783    // an app opening a specific file with an 8:3 "alias",
    17781784    // would surely fail.
    1779     strcpy(longName,
    1780            shortName);
     1785    strcpy(shortName, longName);
    17811786   
    17821787    return; // Done
     
    18401845  CHAR* name;
    18411846
     1847  pFind->dwReserved0 = pFind->dwReserved1 = 0;
    18421848  pFind->dwFileAttributes = pm2WinFileAttributes(pResult->attrFile);
    18431849
     
    18631869{
    18641870  pFind->dwFileAttributes = pm2WinFileAttributes(pResult->attrFile);
     1871  pFind->dwReserved0 = pFind->dwReserved1 = 0;
    18651872
    18661873  pmDateTimeToFileTime(&pResult->fdateCreation,&pResult->ftimeCreation,&pFind->ftCreationTime);
  • trunk/src/kernel32/wprocess.cpp

    r4946 r5016  
    1 /* $Id: wprocess.cpp,v 1.111 2001-01-14 17:16:55 sandervl Exp $ */
     1/* $Id: wprocess.cpp,v 1.112 2001-01-23 11:59:45 sandervl Exp $ */
    22
    33/*
     
    398398    //Flush and delete all open memory mapped files
    399399    Win32MemMap::deleteAll();
     400
     401    //SvL: We must make sure no threads are still suspended (with SuspendThread)
     402    //     OS/2 seems to be unable to terminate the process otherwise (exitlist hang)
     403    TEB *teb = threadList;
     404    threadListMutex.enter();
     405    while(teb) {
     406        ResumeThread(teb->o.odin.hThread);
     407        teb = teb->o.odin.next;
     408    }
     409    threadListMutex.leave();
    400410
    401411    //Restore original OS/2 TIB selector
     
    15881598        DWORD fileAttr;
    15891599
    1590         //TODO: doesn't work for directories with spaces!
    15911600        while(*exename != 0) {
    15921601             while(*exename != 0 && *exename != ' ')
Note: See TracChangeset for help on using the changeset viewer.