Tue Jan 28 16:40:27 2020 UTC ()
Put pri_t back to an int.  It looks like there might be a sign extension
issue somewhere but it's not worth the hassle trying to find it.


(ad)
diff -r1.198 -r1.199 src/sys/sys/lwp.h
diff -r1.103 -r1.104 src/sys/sys/types.h

cvs diff -r1.198 -r1.199 src/sys/sys/lwp.h (expand / switch to unified diff)

--- src/sys/sys/lwp.h 2020/01/25 15:41:52 1.198
+++ src/sys/sys/lwp.h 2020/01/28 16:40:27 1.199
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: lwp.h,v 1.198 2020/01/25 15:41:52 ad Exp $ */ 1/* $NetBSD: lwp.h,v 1.199 2020/01/28 16:40:27 ad Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001, 2006, 2007, 2008, 2009, 2010, 2019, 2020 4 * Copyright (c) 2001, 2006, 2007, 2008, 2009, 2010, 2019, 2020
5 * The NetBSD Foundation, Inc. 5 * The NetBSD Foundation, Inc.
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * This code is derived from software contributed to The NetBSD Foundation 8 * This code is derived from software contributed to The NetBSD Foundation
9 * by Nathan J. Williams and Andrew Doran. 9 * by Nathan J. Williams and Andrew Doran.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions 12 * modification, are permitted provided that the following conditions
13 * are met: 13 * are met:
14 * 1. Redistributions of source code must retain the above copyright 14 * 1. Redistributions of source code must retain the above copyright
@@ -93,27 +93,27 @@ struct lwp { @@ -93,27 +93,27 @@ struct lwp {
93 void *l_addr; /* l: PCB address; use lwp_getpcb() */ 93 void *l_addr; /* l: PCB address; use lwp_getpcb() */
94 struct mdlwp l_md; /* l: machine-dependent fields. */ 94 struct mdlwp l_md; /* l: machine-dependent fields. */
95 struct bintime l_rtime; /* l: real time */ 95 struct bintime l_rtime; /* l: real time */
96 struct bintime l_stime; /* l: start time (while ONPROC) */ 96 struct bintime l_stime; /* l: start time (while ONPROC) */
97 int l_flag; /* l: misc flag values */ 97 int l_flag; /* l: misc flag values */
98 u_int l_swtime; /* l: time swapped in or out */ 98 u_int l_swtime; /* l: time swapped in or out */
99 u_int l_rticks; /* l: Saved start time of run */ 99 u_int l_rticks; /* l: Saved start time of run */
100 u_int l_rticksum; /* l: Sum of ticks spent running */ 100 u_int l_rticksum; /* l: Sum of ticks spent running */
101 u_int l_slpticks; /* l: Saved start time of sleep */ 101 u_int l_slpticks; /* l: Saved start time of sleep */
102 u_int l_slpticksum; /* l: Sum of ticks spent sleeping */ 102 u_int l_slpticksum; /* l: Sum of ticks spent sleeping */
103 int l_biglocks; /* l: biglock count before sleep */ 103 int l_biglocks; /* l: biglock count before sleep */
104 short l_stat; /* l: overall LWP status */ 104 short l_stat; /* l: overall LWP status */
105 short l_class; /* l: scheduling class */ 105 short l_class; /* l: scheduling class */
106 short l_kpriority; /* !: has kernel priority boost */ 106 int l_kpriority; /* !: has kernel priority boost */
107 pri_t l_kpribase; /* !: kernel priority base level */ 107 pri_t l_kpribase; /* !: kernel priority base level */
108 pri_t l_priority; /* l: scheduler priority */ 108 pri_t l_priority; /* l: scheduler priority */
109 pri_t l_inheritedprio;/* l: inherited priority */ 109 pri_t l_inheritedprio;/* l: inherited priority */
110 pri_t l_protectprio; /* l: for PTHREAD_PRIO_PROTECT */ 110 pri_t l_protectprio; /* l: for PTHREAD_PRIO_PROTECT */
111 pri_t l_auxprio; /* l: max(inherit,protect) priority */ 111 pri_t l_auxprio; /* l: max(inherit,protect) priority */
112 int l_protectdepth; /* l: for PTHREAD_PRIO_PROTECT */ 112 int l_protectdepth; /* l: for PTHREAD_PRIO_PROTECT */
113 u_int l_cpticks; /* (: Ticks of CPU time */ 113 u_int l_cpticks; /* (: Ticks of CPU time */
114 psetid_t l_psid; /* l: assigned processor-set ID */ 114 psetid_t l_psid; /* l: assigned processor-set ID */
115 fixpt_t l_pctcpu; /* p: %cpu during l_swtime */ 115 fixpt_t l_pctcpu; /* p: %cpu during l_swtime */
116 fixpt_t l_estcpu; /* l: cpu time for SCHED_4BSD */ 116 fixpt_t l_estcpu; /* l: cpu time for SCHED_4BSD */
117 volatile uint64_t l_ncsw; /* l: total context switches */ 117 volatile uint64_t l_ncsw; /* l: total context switches */
118 volatile uint64_t l_nivcsw; /* l: involuntary context switches */ 118 volatile uint64_t l_nivcsw; /* l: involuntary context switches */
119 SLIST_HEAD(, turnstile) l_pi_lenders; /* l: ts lending us priority */ 119 SLIST_HEAD(, turnstile) l_pi_lenders; /* l: ts lending us priority */

cvs diff -r1.103 -r1.104 src/sys/sys/types.h (expand / switch to unified diff)

--- src/sys/sys/types.h 2020/01/12 21:40:44 1.103
+++ src/sys/sys/types.h 2020/01/28 16:40:27 1.104
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: types.h,v 1.103 2020/01/12 21:40:44 ad Exp $ */ 1/* $NetBSD: types.h,v 1.104 2020/01/28 16:40:27 ad Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1982, 1986, 1991, 1993, 1994 4 * Copyright (c) 1982, 1986, 1991, 1993, 1994
5 * The Regents of the University of California. All rights reserved. 5 * The Regents of the University of California. All rights reserved.
6 * (c) UNIX System Laboratories, Inc. 6 * (c) UNIX System Laboratories, Inc.
7 * All or some portions of this file are derived from material licensed 7 * All or some portions of this file are derived from material licensed
8 * to the University of California by American Telephone and Telegraph 8 * to the University of California by American Telephone and Telegraph
9 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 9 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
10 * the permission of UNIX System Laboratories, Inc. 10 * the permission of UNIX System Laboratories, Inc.
11 * 11 *
12 * Redistribution and use in source and binary forms, with or without 12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions 13 * modification, are permitted provided that the following conditions
14 * are met: 14 * are met:
@@ -307,27 +307,27 @@ typedef _BSD_SUSECONDS_T_ suseconds_t; @@ -307,27 +307,27 @@ typedef _BSD_SUSECONDS_T_ suseconds_t;
307 307
308#ifdef _BSD_USECONDS_T_ 308#ifdef _BSD_USECONDS_T_
309typedef _BSD_USECONDS_T_ useconds_t; 309typedef _BSD_USECONDS_T_ useconds_t;
310#undef _BSD_USECONDS_T_ 310#undef _BSD_USECONDS_T_
311#endif 311#endif
312 312
313#ifdef _NETBSD_SOURCE 313#ifdef _NETBSD_SOURCE
314#include <sys/fd_set.h> 314#include <sys/fd_set.h>
315 315
316#define NBBY 8 316#define NBBY 8
317 317
318typedef struct kauth_cred *kauth_cred_t; 318typedef struct kauth_cred *kauth_cred_t;
319 319
320typedef short pri_t; 320typedef int pri_t;
321 321
322#endif 322#endif
323 323
324#if defined(__STDC__) && (defined(_KERNEL) || defined(_KMEMUSER)) 324#if defined(__STDC__) && (defined(_KERNEL) || defined(_KMEMUSER))
325/* 325/*
326 * Forward structure declarations for function prototypes. We include the 326 * Forward structure declarations for function prototypes. We include the
327 * common structures that cross subsystem boundaries here; others are mostly 327 * common structures that cross subsystem boundaries here; others are mostly
328 * used in the same place that the structure is defined. 328 * used in the same place that the structure is defined.
329 */ 329 */
330struct lwp; 330struct lwp;
331typedef struct lwp lwp_t; 331typedef struct lwp lwp_t;
332struct __ucontext; 332struct __ucontext;
333struct proc; 333struct proc;