| 285 | } |
| 286 | |
| 287 | void |
| 288 | cpu_exit(struct thread *td) |
| 289 | { |
| 290 | |
| 291 | /* |
| 292 | * If this process has a custom LDT, release it. Reset pc->pcb_gs |
| 293 | * and %gs before we free it in case they refer to an LDT entry. |
| 294 | */ |
| 295 | mtx_lock_spin(&dt_lock); |
| 296 | if (td->td_proc->p_md.md_ldt) { |
| 297 | td->td_pcb->pcb_gs = _udatasel; |
| 298 | load_gs(_udatasel); |
| 299 | user_ldt_free(td); |
| 300 | } else |
| 301 | mtx_unlock_spin(&dt_lock); |
| 302 | } |
| 303 | |
| 304 | void |
| 305 | cpu_thread_exit(struct thread *td) |
nothing calls this directly
no test coverage detected