MMLite Base Types

MMLite base types separate variable and fixed size types from each other. This avoids the common problem of having supposedly variable size types that are in practice fixed size. By providing the programmer explicit information some guessing and unnecessary mistakes are avoided. Other types build on top of the basic scalar types, as well as interface pointers.

INT

An integer of the natural size for the machine. This type is the size of a register and is large enough to hold a regular pointer. Using this variable explicitly states that the code is meant to run on variable bit length machines.

On a 16-bit processor INT is 16 bits, on a 32-bit processor 32 bits, and on a 64-bit processor it is 64 bits. On an 8-bit processor INT would typically be 16 bits as pointers are typically that length.

UINT

Unsigned version of INT (see above).

INT8 INT16 INT32 INT64

These types state that there is an expectation of the length of the variable and what the length is. The number of bits expected of the variable is exactly what the name specifies. The length will be the same regardless of processor.

If the compiler does not support 64-bit types, they will be supported through macros and structures. See include/base/int64.h.

UINT8 UINT16 UINT32 UINT64

Unsigned versions of the corresponding fixed size types.

PINT PUINT

Pointers to the corresponding variable size types.

PINT8 PUINT8 PINT16 PUINT16 PINT32 PUINT32 PINT64 PUINT64 Type

Pointers to the corresponding fixed size types.

TIME PTIME

Time is represented as a signed64 bit variable that counts time in 100 ns (10MHz) increments. If time is positive it is absolute starting in 1600. If time is negative it is relative. Zero usually means immediate. TIME_FOREVER means never. See Time management functions.

TIME_CONSTRAINT PTIME_CONSTRAINT

A scheduling time constraint for feedback scheduler. See struct definition.

CONDITION PCONDITION

A condition variable. See Condition variable functions and struct definition. Condition variables and mutexes are used together to implement safe multithreaded access to variables and other resources as well as waiting and other synchronization.

MUTEX PMUTEX

A mutual exclusion variable. See Mutex functions and struct definition.

BOOL PBOOL

Boolean variable. The size is processor specific and is one or more bits.

IID

A unique ID that identifies an interface and version for type checking purposes. The program uuidgen.exe can be used to generate new unique ids. Every time an interfqce changes, a new IID should be generated so that run-time type checking will catch any incompatibilities. The IIDs are inserted into the interface definition XML file and can be referred to as &IID_Ixxx in a program.

REFIID

Pointer to an IID, or reference in C++.

SCODE

Status code. S_OK is the most common value. See IUnknown constant section for other values. The macros FAILED(sc) and SUCCEEDED(sc) test whether the code means failure or success.

VM_OFFSET

An offset into a virtual memory space or mapping. This is a logical address used by the virtual memory system. It might be different from both the physical (as on the hardware address bus) and virtual (as in a memory reference from a program)address sizes of the processor. See IVmSpace and IVmMapping.

VM_SIZE

The size of a virtual memory operation as used by IVmSpace and IVmMapping.

VM_SIZE is the size of a blob referred to by a VM_OFFSET and is usually of the same underlying type.

ADDRESS

A program addressable address, i.e. virtual address. This is really the same as UINT but makes it explicit that the variable holds a pointer.

ADDR_SIZE

The size of a memory blob pointed to by ADDR. This is also the same as UINT but makes it clear that it refers to a size of memory. Essentially same as size_t.

PTR

Shorthand for void *