i386_get_gsbase.c revision 145036
140455Sbde/*-
240455Sbde * Copyright (c) 2005 Peter Wemm
340455Sbde * All rights reserved.
416631Sbde *
540455Sbde * Redistribution and use in source and binary forms, with or without
640455Sbde * modification, are permitted provided that the following conditions
740455Sbde * are met:
840455Sbde * 1. Redistributions of source code must retain the above copyright
940455Sbde *    notice, this list of conditions and the following disclaimer.
1040455Sbde * 2. Redistributions in binary form must reproduce the above copyright
1140455Sbde *    notice, this list of conditions and the following disclaimer in the
1240455Sbde *    documentation and/or other materials provided with the distribution.
1340455Sbde *
1440455Sbde * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1540455Sbde * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1640455Sbde * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1740455Sbde * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
181590Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1940455Sbde * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2040455Sbde * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
211590Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2240455Sbde * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2340455Sbde * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2440455Sbde * SUCH DAMAGE.
2540455Sbde */
2640455Sbde
271590Srgrimes#include <sys/cdefs.h>
2820287Swollman__FBSDID("$FreeBSD: head/lib/libc/i386/sys/i386_get_gsbase.c 145036 2005-04-14 00:01:35Z peter $");
2940455Sbde
3040455Sbde#include <machine/sysarch.h>
3140455Sbde
321590Srgrimesint
3340455Sbdei386_get_gsbase(void **addr)
3440455Sbde{
3540455Sbde
3640455Sbde	return (sysarch(I386_GET_GSBASE, addr));
3716631Sbde}
3840455Sbde