- java.lang.Object
-
- com.ibm.dtfj.corereaders.zos.mvs.Tcb
-
public class Tcb extends Object
This class represents an MVS Task Control Block (TCB). Methods that begin with "tcb" return the value of fields as defined in the IKJTCB macro.
-
-
Constructor Summary
Constructors Constructor Description Tcb(AddressSpace space, long address)
Create a new Tcb for the given address space.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description long
address()
Returns the address of this TcbLse[]
getLinkageStack()
Return the linkage stack as an array of Lse entries.RegisterSet
getRegisters()
Get registers from the TCB itself.RegisterSet
getRegistersFromBPXGMSTA()
Try and get the registers by simulating the BPXGMSTA service.static Tcb[]
getTcbs(AddressSpace space)
Returns an array containing all of the Tcbs in the givenAddressSpace
.AddressSpace
space()
Returns the AddressSpace we belong tolong
tcbcelap()
Return the celap pointer for this Tcb.long
tcbrbp()
Return the rbp pointer for this Tcb.long
tcbrtwa()
Return the rtwa pointer for this Tcb.long
tcbstcb()
Return the stcb pointer for this Tcb.long
tcbtcb()
Return the pointer to the next Tcb in the queue
-
-
-
Constructor Detail
-
Tcb
public Tcb(AddressSpace space, long address)
Create a new Tcb for the given address space.- Parameters:
space
- theAddressSpace
to which this Tcb belongsaddress
- the address of this Tcb
-
-
Method Detail
-
getTcbs
public static Tcb[] getTcbs(AddressSpace space)
Returns an array containing all of the Tcbs in the givenAddressSpace
. Returns null if this address space contains no Tcbs.
-
address
public long address()
Returns the address of this Tcb
-
space
public AddressSpace space()
Returns the AddressSpace we belong to
-
tcbcelap
public long tcbcelap() throws IOException
Return the celap pointer for this Tcb.- Throws:
IOException
- if an error occurred reading from the address space
-
tcbrtwa
public long tcbrtwa() throws IOException
Return the rtwa pointer for this Tcb.- Throws:
IOException
- if an error occurred reading from the address space
-
tcbrbp
public long tcbrbp() throws IOException
Return the rbp pointer for this Tcb.- Throws:
IOException
- if an error occurred reading from the address space
-
tcbstcb
public long tcbstcb() throws IOException
Return the stcb pointer for this Tcb.- Throws:
IOException
- if an error occurred reading from the address space
-
tcbtcb
public long tcbtcb() throws IOException
Return the pointer to the next Tcb in the queue- Throws:
IOException
- if an error occurred reading from the address space
-
getRegisters
public RegisterSet getRegisters() throws IOException
Get registers from the TCB itself. The registers are in the TCB and the PSW comes from the RB.- Throws:
IOException
-
getRegistersFromBPXGMSTA
public RegisterSet getRegistersFromBPXGMSTA() throws IOException
Try and get the registers by simulating the BPXGMSTA service. (XXX I think this is probably the best place to implement this kernel call?)- Throws:
IOException
-
getLinkageStack
public Lse[] getLinkageStack() throws IOException
Return the linkage stack as an array of Lse entries. The length of the array will be zero if the linkage stack is empty. The top of the stack (as represented by stcblsdp) is the first element in the array and the end of the stack (also sometimes referred to as the first entry, aka stcbestk) is the last element in the array.- Throws:
IOException
-
-