aboutsummaryrefslogtreecommitdiff
path: root/lib/libthr/arch/i386/include/pthread_md.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libthr/arch/i386/include/pthread_md.h')
-rw-r--r--lib/libthr/arch/i386/include/pthread_md.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/libthr/arch/i386/include/pthread_md.h b/lib/libthr/arch/i386/include/pthread_md.h
index 8940acee6fee..43f84c3d0393 100644
--- a/lib/libthr/arch/i386/include/pthread_md.h
+++ b/lib/libthr/arch/i386/include/pthread_md.h
@@ -1,5 +1,5 @@
/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ * SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2002 Daniel Eischen <deischen@freebsd.org>.
* Copyright (c) 2005 David Xu <davidxu@freebsd.org>.
@@ -25,8 +25,6 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * $FreeBSD$
*/
/*
@@ -49,11 +47,16 @@ _get_curthread(void)
{
struct pthread *thr;
- __asm __volatile("movl %%gs:%1, %0" : "=r" (thr)
- : "m" (*(volatile u_int *)offsetof(struct tcb, tcb_thread)));
+ __asm __volatile("movl %%gs:%c1, %0" : "=r" (thr)
+ : "i" (offsetof(struct tcb, tcb_thread)));
return (thr);
}
-#define HAS__UMTX_OP_ERR 1
+static __inline void
+_thr_resolve_machdep(void)
+{
+}
+
+#define __thr_setup_tsd(thread) _tcb_set((thread)->tcb)
#endif