Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Jul 2021 11:36:29 +0300
From:      Andriy Gapon <avg@FreeBSD.org>
To:        arch@FreeBSD.org
Subject:   led(9) blinking using dedicated thread
Message-ID:  <ae299d95-9967-b1e5-0da0-15326650c847@FreeBSD.org>

next in thread | raw e-mail | index | archive | help

I would like to change led(9) so that it invokes LED control methods from a 
thread rather rather than from a callout.  This is to support LEDs behind USB 
and I2C where (common) implementations use sleeping waits.

I have created a review request for the proposed change:
https://reviews.freebsd.org/D31215

In the current version the thread is created at init time and is kept around 
forever.  That could be changed to create the thread when a first blinking LED 
is configured.  Also, the thread could be destroyed when a last "blinker" is 
removed.

Alternatively, I am considering whether static (no blinking) LED state changes 
should also be done asynchronously via the thread.


-- 
Andriy Gapon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ae299d95-9967-b1e5-0da0-15326650c847>