Index | Thread | Search

From:
Jonathan Gray <jsg@jsg.id.au>
Subject:
Re: Small tsleep_nsec(9) fix
To:
Marcus Glocker <marcus@nazgul.ch>
Cc:
tech@openbsd.org
Date:
Sat, 23 May 2026 15:53:18 +1000

Download raw body.

Thread
On Sat, May 23, 2026 at 06:50:43AM +0200, Marcus Glocker wrote:
> Found while poking around for other stuff:
> 
> Use the real sc address for tsleep identification instead of the
> stack pointer address.
> 
> Ok?

these would be better as &nowake as there is no wakeup()

> 
> 
> Index: sys/dev/i2c/ietp.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/i2c/ietp.c,v
> diff -u -p -u -p -r1.3 ietp.c
> --- sys/dev/i2c/ietp.c	18 Aug 2024 03:25:04 -0000	1.3
> +++ sys/dev/i2c/ietp.c	23 May 2026 04:43:41 -0000
> @@ -334,7 +334,7 @@ ietp_sleep(struct ietp_softc *sc, int ms
>  	if (cold)
>  		delay(ms * 1000);
>  	else
> -		tsleep_nsec(&sc, PWAIT, "ietp", MSEC_TO_NSEC(ms));
> +		tsleep_nsec(sc, PWAIT, "ietp", MSEC_TO_NSEC(ms));
>  }
>  
>  int
> Index: sys/dev/i2c/ihidev.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/i2c/ihidev.c,v
> diff -u -p -u -p -r1.41 ihidev.c
> --- sys/dev/i2c/ihidev.c	28 Oct 2025 15:36:46 -0000	1.41
> +++ sys/dev/i2c/ihidev.c	23 May 2026 04:43:41 -0000
> @@ -300,7 +300,7 @@ ihidev_sleep(struct ihidev_softc *sc, in
>  	if (cold)
>  		delay(ms * 1000);
>  	else
> -		tsleep_nsec(&sc, PWAIT, "ihidev", MSEC_TO_NSEC(ms));
> +		tsleep_nsec(sc, PWAIT, "ihidev", MSEC_TO_NSEC(ms));
>  }
>  
>  int
> 
>