AP_Scripting: remove old setjmp workarounds

No longer necessary; verified with a debugger. These were also never
applied to Cortex-M4.
This commit is contained in:
Thomas Watson
2025-12-16 21:45:00 -06:00
committed by Andrew Tridgell
parent 83ee6fc583
commit 2fccf2c1be
2 changed files with 2 additions and 20 deletions

View File

@@ -294,15 +294,6 @@ MAV_RESULT AP_Scripting::handle_command_int_packet(const mavlink_command_int_t &
}
#endif
/*
avoid optimisation of the thread function. This avoids nasty traps
where setjmp/longjmp does not properly handle save/restore of
floating point registers on exceptions. This is an extra protection
over the top of the fix in luaD_rawrunprotected() for the same issue
*/
#pragma GCC push_options
#pragma GCC optimize ("O0")
void AP_Scripting::thread(void) {
while (true) {
// reset flags
@@ -398,7 +389,6 @@ void AP_Scripting::thread(void) {
}
}
}
#pragma GCC pop_options
void AP_Scripting::handle_mission_command(const AP_Mission::Mission_Command& cmd_in)
{