Thread Control Block for OS/2 V2.11 with Fix-Pack 90 or Later

See: Fix pack 90 for details of the. change introduced in this fix-pack.

┌──────────────────┬──────┬──────┬────┬────────────────────────────────────────┐
│Field NameOffsetLengthTypeDescription                             │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBOrdinal        │+0    │2     │W   │Ordinal number of thread in PTDA        │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBNumber         │+2    │2     │W   │Thread slot number                      │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBForcedActions  │+4    │4     │D   │Bit vector of forced actions            │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBpPTDA          │+8    │4     │D   │Pointer to the PTDA                     │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBpTSD           │+c    │4     │D   │Pointer to thread swappable data        │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBptib           │+10   │4     │D   │Pointer to thread info block            │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBpTCBNext       │+14   │4     │D   │forward link to next (active) TCB       │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBcbStackMax     │+18   │4     │D   │Virtual size of stack object            │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBcbStackCur     │+1c   │4     │D   │Committed size of stack object          │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBpStack         │+20   │4     │D   │Virtual base of stack                   │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBpStack16Lo     │+24   │4     │D   │Virtual base of 16-bit stack            │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBpStack16Hi     │+28   │4     │D   │Virtual limit of 16-bit stack           │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBpLibiHead      │+2c   │4     │D   │Link to libi load data area             │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBpLibiCurr      │+30   │4     │D   │Link to libi load data area             │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBpLibiFree      │+34   │4     │D   │Link to libi free data area             │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCB_pcriFrameType │+38   │4     │D   │stack frame type                        │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCB_pFrameBase    │+3c   │4     │D   │stack frame base pointer                │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCB_hookheadLocal │+40   │8     │D   │local context hook head                 │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCB_phookOwnerHead│+48   │4     │D   │linked list of hook blocks              │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBpteKStackTCB0  │+4c   │4     │D   │KStack page 0 of TCB                    │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBpteKStackTCB1  │+50   │4     │D   │KStack page 1 of TCB                    │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBpteKStackTSD   │+54   │4     │D   │KStack TSD page                         │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBpteKStackPTDA0 │+58   │4     │D   │KStack page 0 of PTDA                   │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBpteKStackPTDA1 │+5c   │4     │D   │KStack page 1 of PTDA                   │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBpteKStackPTDA2 │+60   │4     │D   │KStack page 2 of PTDA                   │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBCurrTCB        │+64   │4     │D   │SS-relative offset of Current TCB       │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBCurrTSD        │+68   │4     │D   │SS-relative offset of Current TSD       │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBBiasTCB        │+6c   │4     │D   │stack-to-flat TCB conversion value      │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBBiasTSD        │+70   │4     │D   │stack-to-flat TSD conversion value      │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBpDHRetAddr     │+74   │4     │D   │82818 Pointer to DHRouter return address│
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBDMAAdd         │+78   │4     │D   │User's I/O transfer address             │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBSecPos         │+7c   │4     │D   │Position of first sector accessed within│
│                  │      │      │    │file                                    │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBThisSFT        │+80   │4     │D   │pointer to SFT we're working with       │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBValSec         │+84   │4     │D   │Number of valid (previously written)    │
│                  │      │      │    │sectors                                 │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBpRTCB          │+88   │4     │D   │Redirector TCB (Used by LANMAN)         │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBProc_ID        │+8c   │2     │W   │process ID for file sharing checks      │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBUser_ID        │+8e   │2     │W   │user ID for file sharing checks         │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBfSharing       │+90   │1     │B   │non-zero ==> no redirection             │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBSrvAttrib      │+91   │1     │B   │see SetAttrib/file.asm                  │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBJfnFlag        │+92   │1     │B   │JFN flag bits for current fil handle    │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBAllowed        │+93   │1     │B   │Allowed I 24 answers (see allowed_)     │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBOpCookie       │+94   │4     │D   │server's per file cookie                │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBOpFlags        │+98   │2     │W   │whether server wants oplock, etc.       │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBCurBuf         │+9a   │4     │D   │currently assigned buffer               │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBThishVPB       │+9e   │2     │W   │handle of current VPB                   │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBNextAdd        │+a0   │2     │W   │                                        │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBBytSecPos      │+a2   │2     │W   │position of first byte within sector    │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBClusNum        │+a4   │2     │W   │                                        │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBLastPos        │+a6   │2     │W   │                                        │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBBytCnt1        │+a8   │2     │W   │Number of bytes in 1st sector           │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBBytCnt2        │+aa   │2     │W   │# of bytes in last sector               │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBSecCnt         │+ac   │2     │W   │number of whole sectors                 │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBSecClusPos     │+ae   │1     │B   │posit of first sector within cluster    │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBBufHE          │+af   │1     │B   │How to handle a HardError               │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBactBufHE       │+b0   │1     │B   │action response from user on HardErr    │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBfIOLock        │+b1   │1     │B   │NZ if TCBLockHndl is valid              │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBLockHndl       │+b2   │C     │S   │Lock handle of user mem                 │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBThisCDS        │+be   │4     │D   │Address of current CDS                  │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBThisFSC        │+c2   │4     │D   │address of current FSC                  │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBpTmpCDS        │+c6   │4     │D   │Address of dummycds                     │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBpOpenBuf       │+ca   │2     │W   │Address of current OpenBuf              │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBpSearchBuf     │+cc   │2     │W   │Address of SearchBuf                    │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBFailErr        │+ce   │2     │W   │NZ if user did FAIL on I 24             │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCB_SemInfo       │+d0   │4     │D   │16bit addr of the ramsem blocked upon   │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCB_SemDebugAddr  │+d4   │4     │D   │debugger display address for ksems      │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCB_NPX_Buffer    │+d8   │4     │D   │                                        │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBpTCBWaitNext   │+dc   │4     │D   │Next waiting TCB                        │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBpTCBWaitList   │+e0   │4     │D   │Threads waiting for me to die           │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBQState         │+e4   │1     │B   │Scheduler queue location (actual)       │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBState          │+e5   │1     │B   │Current scheduler state (desired)       │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBWakeFlags      │+e6   │1     │B   │TKSleep/TKWakeup Flags                  │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBcWindowBoost   │+e7   │1     │B   │Window Boost count                      │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBPriClass       │+e8   │1     │B   │Priority Class (user)                   │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBPriLevel       │+e9   │1     │B   │Priority Level (user)                   │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBPriClassMod    │+ea   │1     │B   │Priority Class modifier bits            │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBSchFlags       │+eb   │1     │B   │Misc. Scheduler flags                   │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBPriority       │+ec   │2     │W   │Calculated Priority                     │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBPriorityMin    │+ee   │2     │W   │Minimum Scheduling priority             │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBcBoostLock     │+f0   │4     │D   │Kernel Boost Lock nesting count.        │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBpTCBPriNextQ   │+f4   │4     │D   │Next priority queue in chain            │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBpTCBPriPrevQ   │+f8   │4     │D   │Previous priority queue in chain        │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBpTCBPriHigher  │+fc   │4     │D   │Higher priority thread                  │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBpTCBPriLower   │+100  │4     │D   │Lower priority thread                   │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBpTCBPriNext    │+104  │4     │D   │Next same-priority thread               │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBpTCBPriPrev    │+108  │4     │D   │Prev same-priority thread               │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBpTCBWakeup     │+10c  │4     │D   │TKQueryWakeup TCB list                  │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBSleepID        │+110  │4     │D   │Sleep ID this TCB is sleeping on        │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBtoe            │+114  │14    │S   │Timeout/Starvation Timeout element      │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBCheckedSig     │+128  │1     │B   │Used by the loader                      │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBfSwapping      │+129  │1     │B   │status of swapping                      │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBVolIONest      │+12a  │1     │B   │nesting level of FSH_DoVolIO            │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBReqPktFlg      │+12b  │1     │B   │Flag to indicate if request pkt in use  │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBReqPkt         │+12c  │4     │D   │I/O request packet for thread           │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBpMemStatCur    │+130  │4     │D   │Current structure being filled in       │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBMemStat        │+134  │3C    │S   │statistics structure                    │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBSysTime        │+170  │4     │D   │time spent in system code               │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBUserTime       │+174  │4     │D   │time spent in user code                 │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCB_pPVDBThd      │+178  │4     │D   │Ptr to Perfview Data Block for this     │
│                  │      │      │    │thread (pvdb_thd_s).                    │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCB_flDbg         │+17c  │4     │D   │                                        │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBCpl2_ESP       │+180  │4     │D   │Saved TSS CPL2 stack pointer.           │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBCpl2_SS        │+184  │2     │W   │Saved TSS CPL2 stack segment.           │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBNewFlags       │+186  │1     │W   │Value copied from ptda_NewFiles         │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBEntryActions   │+187  │1     │B   │Kernel entry force flags                │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBSig_pend       │+188  │2     │W   │bit vector of pending signals           │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBSig_holding    │+18a  │2     │W   │bit vector of postponed signals         │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBSig_cur        │+18c  │2     │W   │bit vec of signals being processed      │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBXcptRepRec     │+18e  │4     │D   │report record of active exception       │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBSig_termtid    │+192  │2     │W   │                                        │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBSecbits        │+194  │1     │B   │Security bits 54735                     │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBspbytes        │+195  │1     │B   │To keep size 4*N 54735                  │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCB_ulSRIndex     │+196  │4     │D   │                                        │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBMiscFlags      │+19a  │1     │D   │Used for hard error processing          │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBModeFlags      │+19b  │2     │D   │Mode flags for OPEN - for WhatVolume    │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBSpareFlags     │+19d  │1     │B   │Spare flags                             │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBLibiFlags      │+19e  │1     │B   │                                        │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBFiller         │+19f  │1     │B   │                                        │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCB_ProcNameBuf   │+1a0  │4     │D   │Pointer to procedure name               │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCB_ObjNameBuf    │+1a4  │4     │D   │Pointer to object name buffer           │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCB_TmpNameBuf    │+1a8  │4     │D   │aka TCB_TgtModNameBuf                   │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCB_SrcModNameBuf │+1ac  │4     │D   │Used by loader                          │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCB_FaultBuf      │+1b0  │4     │D   │                                        │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCB_ObjNameBufL   │+1b4  │2     │W   │Length of object name buffer            │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCB_TmpNameBufL   │+1b6  │2     │W   │                                        │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCB_SrcModNameBufL│+1b8  │2     │W   │                                        │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCB_FaultBufL     │+1ba  │2     │W   │                                        │
├──────────────────┼──────┼──────┼────┼────────────────────────────────────────┤
│TCBSecchild       │+1bc  │4     │D   │Child Security data 54735               │
└──────────────────┴──────┴──────┴────┴────────────────────────────────────────┘

TCBLibiFlags flag definitions:

┌──────────────────────┬────────┬────────────────────────────────────────┐
│Name                  │Bit Mask│Description                             │
├──────────────────────┼────────┼────────────────────────────────────────┤
│INIT_ROUTINE_FAILED   │(0x01)  │84537 Set if dll init routine failed    │
└──────────────────────┴────────┴────────────────────────────────────────┘


[Back: Thread Control Block for OS/2 Warp V3.0 with Fix-Pack 11 or Later]
[Next: Thread Control Block for OS/2 V2.11]