There doesn't seem to be a way to get an LDT entry without specifying an explicit entry number. FreeBSD allows you to pass LDT_AUTO_ALLOC (-1) as the first argument to i386_set_ldt() to indicate that you just want whatever is the next entry. Is there any reason not to add an equivalent feature to NetBSD ? Robert Swindells