Skip to content

馃毀 Planner flag optimizations - #4433

Open
leptun wants to merge 2 commits into
prusa3d:MK3from
leptun:planner_flag_optimizations
Open

馃毀 Planner flag optimizations#4433
leptun wants to merge 2 commits into
prusa3d:MK3from
leptun:planner_flag_optimizations

Conversation

@leptun

@leptun leptun commented Oct 8, 2023

Copy link
Copy Markdown
Collaborator

Combined boolean variables in the planner struct with the "flag" variable

@leptun
leptun requested a review from gudnimg October 8, 2023 10:10
@github-actions

github-actions Bot commented Oct 8, 2023

Copy link
Copy Markdown

All values in bytes. 螖 Delta to base

Target 螖Flash 螖SRAM Used Flash Used SRAM Free Flash Free SRAM
MK3S_MULTILANG -58 -32 245924 5601 8028 2591
MK3_MULTILANG -58 -32 245220 5610 8732 2582

Comment thread Firmware/planner.cpp
Comment thread Firmware/planner.h
return(NULL);
}
block_t *block = &block_buffer[block_buffer_tail];
block->busy = true;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note this is called in the Stepper ISR. Is it safe to drop the volatile keyword?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I worry about race conditions here

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think yes. I didn't see any place where volatile was really needed.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added @wavexx as reviewer, I think he would know best if this is OK.

@gudnimg
gudnimg requested a review from wavexx November 5, 2023 12:58
@leptun leptun added this to the FW 3.14.1 milestone Nov 25, 2023
@3d-gussner

Copy link
Copy Markdown
Collaborator

@leptun @gudnimg Any update on this one?

@3d-gussner 3d-gussner removed this from the FW 3.14.1 milestone Apr 30, 2024
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.

3 participants