You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 24, 2024. It is now read-only.
The [libuart] and [libadc] use only volatile protocol_callback* var in their callback instances which restricts the interrupt-safety to the actual instance of the callback and not the instance address and its members, so by changing it to volatile protocol_callback *volatile var and declaring the struct protocol_callback members to volatile, the interrupt-safety will include also asynchronous changes to the addresses and member states.
The volatile protocol_callback* would add this feature:
The protocol_callback *volatile would add this functionality:
protocol_callback*volatileinternal_protocol_callback= ...;
protocol_callback*volatilefinalize_callback= ...;
ISR(_xxx__vector) {
//Adjusts the callback instance address to another oneinternal_protocol_callback=finalize_callback;
}
The typedef struct { void (*volatile on_command)(vector); } protcol_callback; would add this functionality:
volatileprotocol_callback*volatileinternal_protocol_callback= ...;
volatileprotocol_callback*volatilefinalize_callback= ...;
ISR(_xxx__vector) {
//Adjusts the callback instance address to another oneinternal_protocol_callback->on_command=finalize_callback->on_command;
}