mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Fixes interrupts not getting closed properly. (#1088)
The threads being created were never getting cleaned up.
This commit is contained in:
committed by
Peter Johnson
parent
62d5301b1f
commit
381c25c573
@@ -105,10 +105,15 @@ HAL_InterruptHandle HAL_InitializeInterrupts(HAL_Bool watcher,
|
||||
|
||||
return handle;
|
||||
}
|
||||
void HAL_CleanInterrupts(HAL_InterruptHandle interruptHandle, int32_t* status) {
|
||||
void* HAL_CleanInterrupts(HAL_InterruptHandle interruptHandle,
|
||||
int32_t* status) {
|
||||
HAL_DisableInterrupts(interruptHandle, status);
|
||||
auto interrupt = interruptHandles->Get(interruptHandle);
|
||||
auto anInterrupt = interruptHandles->Get(interruptHandle);
|
||||
interruptHandles->Free(interruptHandle);
|
||||
if (anInterrupt == nullptr) {
|
||||
return nullptr;
|
||||
}
|
||||
return anInterrupt->callbackParam;
|
||||
}
|
||||
|
||||
static void ProcessInterruptDigitalSynchronous(const char* name, void* param,
|
||||
|
||||
Reference in New Issue
Block a user