From 5ae6a349c28e523fa6a3c90bdddcac426bb53ae4 Mon Sep 17 00:00:00 2001 From: davidxu Date: Thu, 31 Jul 2003 02:13:48 +0000 Subject: Update manual for i386_set_ldt to reflect newly added features. Submitted by: julian --- lib/libc/i386/sys/i386_get_ldt.2 | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'lib') diff --git a/lib/libc/i386/sys/i386_get_ldt.2 b/lib/libc/i386/sys/i386_get_ldt.2 index 9a6eb94..bc63578 100644 --- a/lib/libc/i386/sys/i386_get_ldt.2 +++ b/lib/libc/i386/sys/i386_get_ldt.2 @@ -73,6 +73,38 @@ can be either segment_descriptor or gate_descriptor and are defined in .Aq Pa i386/segments.h . These structures are defined by the architecture as disjoint bit-fields, so care must be taken in constructing them. +.Pp +If +.Fa start_sel +is 0, +.Fa num_sels +is 1 and the descriptor pointed to by +.Fa descs +is legal, then +.Fn i386_set_ldt +will allocate a descriptor and return its +selector number. +.Pp +If +.Fa num_descs +is 1, +.Fa start_sels +is valid, and +.Fa descs +is NULL, then +.Fn i386_set_ldt +will free that descriptor +(making it available to be reallocated again later). +.Pp +If +.Fa num_descs +is 0, +.Fa start_sels +is 0 and +.Fa descs +is NULL then, as a special case, +.Fn i386_set_ldt +will free all descriptors. .Sh RETURN VALUES Upon successful completion, .Fn i386_get_ldt @@ -81,6 +113,8 @@ The .Fn i386_set_ldt system call returns the first selector set. +In the case when a descriptor is allocated by the kernel, its number will +be returned. Otherwise, a value of -1 is returned and the global variable .Va errno -- cgit v1.1