thread_descriptor


struct thread_descriptor
{
  unsigned short limit_low;
  unsigned short base_low;
  unsigned base_middle   : 8;
  unsigned type          : 5;
  unsigned descriptor    : 2;
  unsigned present       : 1;
  unsigned limit_high    : 4;
  unsigned system        : 1;
  unsigned reserved      : 1;
  unsigned default_big   : 1;
  unsigned granularity   : 1;
  unsigned base_high     : 8;
};

limit_low The low order 16 bits of the address of the last byte in the segment.
base_low The low order 16 bits of the base address of the segment.
base_middle Bits 16-23 of the base address of the segment.
type Bits describing the type of the segment (see table below).
descriptor The privilege level of the descriptor. This integer value ranges from 0 through 3 (most to least privileged).
present This member is 1 if the segment is present in physical memory and 0 otherwise.
limit_high Bits 16 to 19 of the address of the last byte in the segment.
system A bit that is available to system programmers.
reserved A reserved bit.
default_big For data segments, this member is 1 when the segment is larger than 64K and zero otherwise,

For code segments, this member is 1 if the segment is a 32 bit code segment and 0 if the segment is an 80286 code segment with 16-bit offsets.

granularity This member is 0 if the segment is byte granular and 1 if the segment is page granular.
base_high Bits 24 - 31 of the base address of the segment.

Type Member

The value of the 5 bits of the type member are described in the table below.

Value Description
0 Read-only data segment.
1 Read-write data segment
2 Unused segment.
3 Read-write expand-down data segment.
4 Execute-only code segment.
5 Executable-readable code segment.
6 Execute-only "conforming" code segment.
7 Executable-readable "conforming" code segment.