Lines Matching refs:old_ldt
96 user_ldt_t new_ldt, old_ldt;
114 old_ldt = task->i386_ldt;
117 if (old_ldt) {
129 while (i < old_ldt->count)
131 if (!memcmp(&old_ldt->ldt[i++], &null_ldt, sizeof(null_ldt))) {
150 start_sel = old_ldt->start + i - null_count;
171 if (old_ldt != NULL) {
172 if (old_ldt->start < begin_sel)
173 begin_sel = old_ldt->start;
174 if (old_ldt->start + old_ldt->count > end_sel)
175 end_sel = old_ldt->start + old_ldt->count;
193 if (old_ldt) {
194 bcopy(&old_ldt->ldt[0],
195 &new_ldt->ldt[old_ldt->start - begin_sel],
196 old_ldt->count * sizeof(struct real_descriptor));
203 if (old_ldt->start + old_ldt->count < start_sel)
204 bzero(&new_ldt->ldt[old_ldt->count],
205 (start_sel - (old_ldt->start + old_ldt->count)) * sizeof(struct real_descriptor));
206 else if (old_ldt->start > start_sel + num_sels)
208 (old_ldt->start - (start_sel + num_sels)) * sizeof(struct real_descriptor));
275 if (old_ldt)
276 user_ldt_free(old_ldt);