Skip to content

Issue #378 - Have wiringPiISR and wiringPiISR2 return error on failure in initialization#379

Merged
mstroh76 merged 3 commits intoWiringPi:wiringPiISRfrom
naokiiwakami:issue-378
Aug 26, 2025
Merged

Issue #378 - Have wiringPiISR and wiringPiISR2 return error on failure in initialization#379
mstroh76 merged 3 commits intoWiringPi:wiringPiISRfrom
naokiiwakami:issue-378

Conversation

@naokiiwakami
Copy link
Contributor

This is a fix to functions wiringPiISR and wiringpiISR2 for issue #378.

The each function initializes the event listener loop in a spawned
listener thread. The new thread does not report errors back to the
original caller. So the function misses the initialization errors.
The code is fixed to initialize the event listener in the original
thread before spawning the listener thread so that the function
can pick up errors and return them to the user.

Tested using Raspberry Pi 4. The following attached file is the test code.
wpi-test.tar.gz

…zation

The each function initializes the event listener loop in a spawned
listener thread. The new thread does not report errors back to the
original caller. So the function misses initialization errors.
The code is fixed to initialize the event listener in the original
thread before spawning the listener thread so that the function
can pick up errors and return them to the user.
@mstroh76 mstroh76 changed the base branch from develop to wiringPiISR August 26, 2025 15:26
@mstroh76 mstroh76 merged commit 0add43c into WiringPi:wiringPiISR Aug 26, 2025
1 check passed
@naokiiwakami naokiiwakami deleted the issue-378 branch August 26, 2025 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants