Re: [Hamlib-developer] [Hamlib/Hamlib] 439bd9: Fix the easy parts of missing thread locks
Library to control radio transceivers and receivers
Brought to you by:
n0nb
|
From: George B. <geo...@gm...> - 2025-02-28 15:15:11
|
I was really only trying to get github CI to check the build on windows(hence the PR title) - I don't know if the win pthread implementation supports the PTHREAD_MUTEX_RECURSIVE attribute type. Anyway, if it compiles it should work at least as well as the current code, except for one big gotcha - if somewhere deep in the bowels of hamlib I/O error handling tries to do rig_close()/rig_open() for recovery, all bets are off. rig_close() will try to terminate all threads, some of which may be waiting on a mutex. That's not a new problem, but this code may make the problem more evident. On 2/28/25 07:14, Michael Black via Hamlib-developer wrote: > Branch: refs/heads/master > Home: https://github.com/Hamlib/Hamlib > Commit: 439bd96b5d01ddbaf811a1e1df98c08a1caff406 > https://github.com/Hamlib/Hamlib/commit/439bd96b5d01ddbaf811a1e1df98c08a1caff406 > Author: George Baltz N3GB <Geo...@gm...> > Date: 2025-02-27 (Thu, 27 Feb 2025) > > Changed paths: > M src/rig.c > > Log Message: > ----------- > Fix the easy parts of missing thread locks > > - Fix depth initialization so LOCK() at least calls rig_lock() > - Add message showing why rig_lock() does nothing > - Add missing LOCK(0)s > > > Commit: 0147da5a3ca8dc0f874d2a43ff5a2e702bbc4f41 > https://github.com/Hamlib/Hamlib/commit/0147da5a3ca8dc0f874d2a43ff5a2e702bbc4f41 > Author: George Baltz N3GB <Geo...@gm...> > Date: 2025-02-28 (Fri, 28 Feb 2025) > > Changed paths: > M include/hamlib/rig.h > M src/rig.c > > Log Message: > ----------- > Replace rs->multicast->mutex with a dedicated mutex for the API. > > Use PTHREAD_MUTEX_RECURSIVE and change LOCK() to always call rig_lock(). > Still needs a reliable way to determine availability. > > > Commit: f2f947c51d45f5596afd0b8b3c8df7c3d88d93dd > https://github.com/Hamlib/Hamlib/commit/f2f947c51d45f5596afd0b8b3c8df7c3d88d93dd > Author: Michael Black <mdb...@ya...> > Date: 2025-02-28 (Fri, 28 Feb 2025) > > Changed paths: > M include/hamlib/rig.h > M src/rig.c > > Log Message: > ----------- > Merge pull request #1675 from GeoBaltz/fix26 > > DO NOT MERGE! > > > Compare: https://github.com/Hamlib/Hamlib/compare/3d46647808dc...f2f947c51d45 > > To unsubscribe from these emails, change your notification settings at https://github.com/Hamlib/Hamlib/settings/notifications > > > _______________________________________________ > Hamlib-developer mailing list > Ham...@li... > https://lists.sourceforge.net/lists/listinfo/hamlib-developer |