1178580Simp/*- 2178580Simp * Copyright (c) 2004 Doug Rabson 3178580Simp * All rights reserved. 4178580Simp * 5178580Simp * Redistribution and use in source and binary forms, with or without 6178580Simp * modification, are permitted provided that the following conditions 7178580Simp * are met: 8178580Simp * 1. Redistributions of source code must retain the above copyright 9178580Simp * notice, this list of conditions and the following disclaimer. 10178580Simp * 2. Redistributions in binary form must reproduce the above copyright 11178580Simp * notice, this list of conditions and the following disclaimer in the 12178580Simp * documentation and/or other materials provided with the distribution. 13178580Simp * 14178580Simp * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15178580Simp * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16178580Simp * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17178580Simp * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18178580Simp * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19178580Simp * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20178580Simp * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21178580Simp * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22178580Simp * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23178580Simp * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24178580Simp * SUCH DAMAGE. 25178580Simp * 26178580Simp * $FreeBSD$ 27178580Simp */ 28178580Simp 29178580Simp#include <string.h> 30178580Simp#include <stdint.h> 31178580Simp 32232581Sgonzo#include <machine/sysarch.h> 33288019Srodrigc#include "libc_private.h" 34232581Sgonzo 35178580Simpvoid 36178580Simp_set_tp(void *tp) 37178580Simp{ 38232581Sgonzo 39232581Sgonzo sysarch(MIPS_SET_TLS, tp); 40178580Simp} 41