1 L3 types

The following chapters will refer to various data types. They are defined in the header file l3types.h.

ByteT
This type describes a single byte in gcc. It is a simple unsigned char.

DWordT
This type describes a double word in gcc. It is a normal int.

TShortDS, TLongDS;
This type describes a dataspace id. There are two types of id's, a short and a long version. The short version represents a dataspace from the standard pager. The other id stands for a dataspace from any pager.
typdef int TShortDS;

struct tagLongDS {
   ThreadT PagerID;
   TShortDS DSID;
   unsigned short MagicWord;
   unsigned short TaskNo;
};
typedef struct tagLongDS TLongDS;          

TaskT
This type describes a task id. A task id consists of different elements, the:

These elements are packed into an eight byte structure, which looks like the following (Caution!: The compiler allocates the bits from the right to the left side) :

struct tagBTask {
   unsigned Tlb0Low:14;
   unsigned TaskNo:10;
   unsigned Tlb0High:8;

   unsigned VerLow:14;
   unsigned ChiefNo:10;
   unsigned VerHigh:8;
};
typedef struct tagBTask TBTask;
 
struct tagSTask { 
   int Low,High; 
};
typedef struct tagSTask TSTask; 

union tagTask{ 
   TBTask    B;
   TSTask    L; 
   long long ID; 
};
typedef union tagTask TaskT; 

ThreadT
This type describes a thread id. A task has at least one thread, but can also have more then one. A thread id looks similiar to a task id. It is also an eight byte structure with the following elements:

The structure looks like the following.

struct tagBThread {
   unsigned VerLow:12;
   unsigned ThreadNo:14;
   unsigned VerHigh:6;

   unsigned StationNo:12;
   unsigned ChiefNo:14;
   unsigned Depth:6;
};
typedef struct tagBThread TBThread;
 
struct tagSThread { 
   int Low,High; 
};
typedef struct tagSThread TSThread; 

union tagThread{ 
   TBThread    B;
   TSThread    L; 
   long long ID; 
};
typedef union tagThread ThreadT; 

TMessageDope
This type defines a messagedope, a four byte item describing the structure of a message. For easier access to the single elements it is a union with a simple int and a structure containing five elements.
struct tagMessageDope 
{ 
   unsigned Dummy:8; 
   unsigned DWords:8; 
   unsigned Strings:4; 
   unsigned Flexpages:4;
   unsigned Dataspaces:8; 
};
typedef struct tagMessageDope TMessageDope; 

union tagMsgDope 
{ 
   DWordT   DWord; 
   TMessageDope MsgDope;
};
typedef union tagMsgDope MsgDopeT; 

StrDopeT
This type describes a string, a data area of bytes. It consists of a string part, the part to be sent, and a buffer part for an incoming string. Both parts are described by an address and the size of the specified area.
struct tagStrDope
{ 
    DWordT StrLength;  
    DWordT StrAddress;
    DWordT StrBufSize;   
    DWordT StrBufAddress;
}; 
typedef struct tagStrDope StrDopeT;

TFlexPage
This type descibes a so-called flexpage, one or more pages of an address space, which are send or received within a message. The structure looks like the following:
struct tagFlexPage { 
   DWordT MapCode; 
   DWordT SndBase; 
   DWordT SndFPage;
   DWordT RcvFPage; 
};
typedef struct tagFlexPage TFlexPage; 

Marion Schalm, Jean Wolter, Michael Hohmuth
26.12.1995 (unfinished)