Changeset 206 for trunk/src/helpers/procstat.c
- Timestamp:
- Aug 12, 2002, 5:54:49 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/procstat.c
r169 r206 519 519 { 520 520 #define BUFSIZE (256 * 1024) // 128000l 521 521 522 PCHAR pBuf = NULL; // (PCHAR)malloc(BUFSIZE); 522 523 … … 572 573 int i; 573 574 PQTHREAD32 t = pProcThis->pThreads; 574 PQMODULE32 pModule = prc32FindModule(pInfo,575 pProcThis->usHModule); 576 577 if (pModule)575 PQMODULE32 pModule; 576 577 if (pModule = prc32FindModule(pInfo, 578 pProcThis->usHModule)) 578 579 { 579 580 // the module name is fully qualified, so find the … … 581 582 if (pModule->pcName) 582 583 { 583 PSZ pLastBackslash = strrchr(pModule->pcName, '\\');584 if (pLastBackslash )584 PSZ pLastBackslash; 585 if (pLastBackslash = strrchr(pModule->pcName, '\\')) 585 586 // found: 586 587 if (stricmp(pLastBackslash + 1, pcszName) == 0) … … 608 609 609 610 /* 611 *@@ prc32FindProcessFromPID: 612 * 613 *@@added V0.9.21 (2002-08-12) [umoeller] 614 */ 615 616 PQPROCESS32 prc32FindProcessFromPID(PQTOPLEVEL32 pInfo, 617 ULONG pid) 618 { 619 PQPROCESS32 pProcThis = pInfo->pProcessData; 620 while (pProcThis && pProcThis->ulRecType == 1) 621 { 622 int i; 623 PQTHREAD32 t = pProcThis->pThreads; 624 625 if (pProcThis->usPID == pid) 626 return pProcThis; 627 628 // for next process, skip the threads info; 629 // the next process block comes after the 630 // threads 631 for (i=0; 632 i < pProcThis->usThreadCount; 633 i++, t++) 634 ; 635 636 pProcThis = (PQPROCESS32)t; 637 } 638 639 return NULL; 640 } 641 642 /* 610 643 *@@ prc32FindSem16: 611 644 * attempts to find the specified 16-bit semaphore
Note:
See TracChangeset
for help on using the changeset viewer.