186cb007fSWarner Losh /*- 25b81b6b3SRodney W. Grimes * Copyright (c) 1991 Regents of the University of California. 35b81b6b3SRodney W. Grimes * All rights reserved. 45b81b6b3SRodney W. Grimes * 55b81b6b3SRodney W. Grimes * Redistribution and use in source and binary forms, with or without 65b81b6b3SRodney W. Grimes * modification, are permitted provided that the following conditions 75b81b6b3SRodney W. Grimes * are met: 85b81b6b3SRodney W. Grimes * 1. Redistributions of source code must retain the above copyright 95b81b6b3SRodney W. Grimes * notice, this list of conditions and the following disclaimer. 105b81b6b3SRodney W. Grimes * 2. Redistributions in binary form must reproduce the above copyright 115b81b6b3SRodney W. Grimes * notice, this list of conditions and the following disclaimer in the 125b81b6b3SRodney W. Grimes * documentation and/or other materials provided with the distribution. 135b81b6b3SRodney W. Grimes * 4. Neither the name of the University nor the names of its contributors 145b81b6b3SRodney W. Grimes * may be used to endorse or promote products derived from this software 155b81b6b3SRodney W. Grimes * without specific prior written permission. 165b81b6b3SRodney W. Grimes * 175b81b6b3SRodney W. Grimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 185b81b6b3SRodney W. Grimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 195b81b6b3SRodney W. Grimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 205b81b6b3SRodney W. Grimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 215b81b6b3SRodney W. Grimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 225b81b6b3SRodney W. Grimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 235b81b6b3SRodney W. Grimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 245b81b6b3SRodney W. Grimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 255b81b6b3SRodney W. Grimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 265b81b6b3SRodney W. Grimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 275b81b6b3SRodney W. Grimes * SUCH DAMAGE. 285b81b6b3SRodney W. Grimes * 2934a8ed1bSRodney W. Grimes * from: @(#)proc.h 7.1 (Berkeley) 5/15/91 30c3aac50fSPeter Wemm * $FreeBSD$ 315b81b6b3SRodney W. Grimes */ 325b81b6b3SRodney W. Grimes 336e393973SGarrett Wollman #ifndef _MACHINE_PROC_H_ 346f486a55SPeter Wemm #define _MACHINE_PROC_H_ 356e393973SGarrett Wollman 3624db0459SJohn Baldwin #include <machine/segments.h> 3724db0459SJohn Baldwin 3824db0459SJohn Baldwin struct proc_ldt { 3924db0459SJohn Baldwin caddr_t ldt_base; 4024db0459SJohn Baldwin int ldt_len; 4124db0459SJohn Baldwin int ldt_refcnt; 4224db0459SJohn Baldwin u_long ldt_active; 4324db0459SJohn Baldwin struct segment_descriptor ldt_sd; 4424db0459SJohn Baldwin }; 455206bca1SLuoqi Chen 465b81b6b3SRodney W. Grimes /* 479368fc20SNate Williams * Machine-dependent part of the proc structure for i386. 485b81b6b3SRodney W. Grimes */ 49b40ce416SJulian Elischer struct mdthread { 50c6a37e84SJohn Baldwin int md_spinlock_count; /* (k) */ 51c6a37e84SJohn Baldwin register_t md_saved_flags; /* (k) */ 52b40ce416SJulian Elischer }; 53b40ce416SJulian Elischer 545b81b6b3SRodney W. Grimes struct mdproc { 55ab794803SJohn Baldwin struct proc_ldt *md_ldt; /* (j) per-process ldt */ 565b81b6b3SRodney W. Grimes }; 575b81b6b3SRodney W. Grimes 5824db0459SJohn Baldwin #ifdef _KERNEL 5924db0459SJohn Baldwin 60b63dc6adSAlfred Perlstein void set_user_ldt(struct mdproc *); 61b63dc6adSAlfred Perlstein struct proc_ldt *user_ldt_alloc(struct mdproc *, int); 62b63dc6adSAlfred Perlstein void user_ldt_free(struct thread *); 6324db0459SJohn Baldwin 6424db0459SJohn Baldwin #endif /* _KERNEL */ 6524db0459SJohn Baldwin 666f486a55SPeter Wemm #endif /* !_MACHINE_PROC_H_ */ 67