Back to Darwin Xnu

I386 Set Ldt

osfmk/man/i386_set_ldt.html

latest1.4 KB
Original Source

i386_set_ldt


Function - Set per-thread segment descriptors.

SYNOPSIS

**kern\_return\_t i386\_set\_ldt**** (thread\_act\_t **target\_act,** int **first\_selector,** descriptor\_list\_t **desc\_list** );**

PARAMETERS

target_act[in thread send right] Thread whose segment descriptors are to be set.

first_selector[in scalar] Selector value (segment register value) corresponding to the first segment whose descriptor is to be set.

desc_list[pointer to in array of descriptor_t] Array of segment descriptors. The following forms are permitted:

  • Empty descriptor. The ACC_P flag (segment present) may or may not be set.

  • ACC_CALL_GATE --Converted into a system call gate. The ACC_P flag must be set.

All other descriptors must have both the ACC_P flag set and specify user mode access ( ACC_PL_U ).

  • ACC_DATA.

  • ACC_DATA_W.

  • ACC_DATA_E.

  • ACC_DATA_EW.

  • ACC_CODE.

  • ACC_CODE_R.

  • ACC_CODE_C.

  • ACC_CODE_CR.

  • ACC_CALL_GATE_16.

  • ACC_CALL_GATE.

DESCRIPTION

The i386_set_ldt function allows a thread to have a private local descriptor table (LDT) which allows its local segments to map various ranges of its address space.

RETURN VALUES

Only generic errors apply.

Functions: i386_get_ldt.