11a62e9bcSJohn Baldwin /*- 2*4d846d26SWarner Losh * SPDX-License-Identifier: BSD-2-Clause 31a62e9bcSJohn Baldwin * 41a62e9bcSJohn Baldwin * Copyright (c) 2005 David Xu <davidxu@freebsd.org>. 51a62e9bcSJohn Baldwin * All rights reserved. 61a62e9bcSJohn Baldwin * 71a62e9bcSJohn Baldwin * Redistribution and use in source and binary forms, with or without 81a62e9bcSJohn Baldwin * modification, are permitted provided that the following conditions 91a62e9bcSJohn Baldwin * are met: 101a62e9bcSJohn Baldwin * 111a62e9bcSJohn Baldwin * 1. Redistributions of source code must retain the above copyright 121a62e9bcSJohn Baldwin * notice, this list of conditions and the following disclaimer. 131a62e9bcSJohn Baldwin * 2. Redistributions in binary form must reproduce the above copyright 141a62e9bcSJohn Baldwin * notice, this list of conditions and the following disclaimer in the 151a62e9bcSJohn Baldwin * documentation and/or other materials provided with the distribution. 161a62e9bcSJohn Baldwin * 171a62e9bcSJohn Baldwin * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 181a62e9bcSJohn Baldwin * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 191a62e9bcSJohn Baldwin * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 201a62e9bcSJohn Baldwin * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 211a62e9bcSJohn Baldwin * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 221a62e9bcSJohn Baldwin * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 231a62e9bcSJohn Baldwin * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 241a62e9bcSJohn Baldwin * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 251a62e9bcSJohn Baldwin * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 261a62e9bcSJohn Baldwin * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 271a62e9bcSJohn Baldwin */ 281a62e9bcSJohn Baldwin 291a62e9bcSJohn Baldwin #ifndef _SYS_TLS_VARIANT_I_H_ 301a62e9bcSJohn Baldwin #define _SYS_TLS_VARIANT_I_H_ 311a62e9bcSJohn Baldwin 321a62e9bcSJohn Baldwin /* 331a62e9bcSJohn Baldwin * Variant I TLS uses the same TCB layout across architectures. 341a62e9bcSJohn Baldwin */ 351a62e9bcSJohn Baldwin 361a62e9bcSJohn Baldwin #define TLS_VARIANT_I 371a62e9bcSJohn Baldwin 381a62e9bcSJohn Baldwin struct pthread; 391a62e9bcSJohn Baldwin 401a62e9bcSJohn Baldwin struct tcb { 411a62e9bcSJohn Baldwin uintptr_t *tcb_dtv; /* required by rtld */ 421a62e9bcSJohn Baldwin struct pthread *tcb_thread; 431a62e9bcSJohn Baldwin }; 441a62e9bcSJohn Baldwin 451a62e9bcSJohn Baldwin #define TLS_TCB_SIZE sizeof(struct tcb) 461a62e9bcSJohn Baldwin 471a62e9bcSJohn Baldwin #endif /* !_SYS_TLS_VARIANT_I_H_ */ 48