16443773dSMatt Macy /*- 24d846d26SWarner Losh * SPDX-License-Identifier: BSD-2-Clause 36443773dSMatt Macy * 46443773dSMatt Macy * Copyright (c) 2018, Matthew Macy <mmacy@freebsd.org> 56443773dSMatt Macy * 66443773dSMatt Macy * Redistribution and use in source and binary forms, with or without 76443773dSMatt Macy * modification, are permitted provided that the following conditions 86443773dSMatt Macy * are met: 96443773dSMatt Macy * 1. Redistributions of source code must retain the above copyright 106443773dSMatt Macy * notice, this list of conditions and the following disclaimer. 116443773dSMatt Macy * 2. Redistributions in binary form must reproduce the above copyright 126443773dSMatt Macy * notice, this list of conditions and the following disclaimer in the 136443773dSMatt Macy * documentation and/or other materials provided with the distribution. 146443773dSMatt Macy * 156443773dSMatt Macy * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 166443773dSMatt Macy * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 176443773dSMatt Macy * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 186443773dSMatt Macy * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 196443773dSMatt Macy * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 206443773dSMatt Macy * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 216443773dSMatt Macy * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 226443773dSMatt Macy * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 236443773dSMatt Macy * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 246443773dSMatt Macy * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 256443773dSMatt Macy * SUCH DAMAGE. 266443773dSMatt Macy */ 276443773dSMatt Macy 286443773dSMatt Macy #ifndef OFFSET_TEST 296443773dSMatt Macy #define GENOFFSET 306443773dSMatt Macy #endif 31*fdafd315SWarner Losh 326443773dSMatt Macy #include <sys/param.h> 336443773dSMatt Macy #include <sys/assym.h> 346443773dSMatt Macy #include <sys/proc.h> 356443773dSMatt Macy 366443773dSMatt Macy OFFSYM(td_priority, thread, u_char); 376443773dSMatt Macy OFFSYM(td_critnest, thread, u_int); 386443773dSMatt Macy OFFSYM(td_pinned, thread, int); 396443773dSMatt Macy OFFSYM(td_owepreempt, thread, u_char); 40