home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HomeWare 14
/
HOMEWARE14.bin
/
os2
/
cenv2_19.arj
/
THREADS.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1994-03-08
|
948b
|
24 lines
EXTPROC CEnvi
/****************************************************************************
*** Threads.cmd - CEnvi program to list all the thread that are runnning ***
*** ver.1 in all of the precesses in the system. ***
****************************************************************************/
PList = ProcessList(TRUE)
assert( NULL != PList )
Count = 1 + GetArraySpan(PList)
for ( i = 0; i < Count; i++ ) {
printf("%s\tID = %d, Parent = %d, name = %s\n",
SplitFileName(PList[i].name).name,PList[i].id,PList[i].parent,PList[i].name)
Threads = PList[i].Threads
if ( Threads != NULL ) {
ThreadCount = 1 + GetArraySpan(Threads);
for ( j = 0; j < ThreadCount; j++ ) {
thread = Threads[j]
printf(" THREAD %d: SysId = %d, Priority = %04X, Status = %d\n",
thread.ProcID,thread.SysID,thread.Priority,thread.Status)
}
}
}