Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Fix _exit implementation #671

Open
wants to merge 3 commits into
base: develop-pros-4
Choose a base branch
from

Conversation

ion098
Copy link
Contributor

@ion098 ion098 commented May 29, 2024

Summary:

Changes the _exit function to flush the serial buffer and indefinitely block.

Motivation:

The _exit function is supposed to never return, but right now it does.

Test Plan:

  • Check it compiles
  • Test that _exit exits the code
  • Test that _exit always flushes the serial buffer
Test Code:
printf("hi");
std::exit(0);
asm volatile("mov r0, #0 \n\tSTR sp, [r0]\n\t"); // if exit does not immediately, there will be a data abort

@WillXuCodes
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@WillXuCodes
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ion098 ion098 changed the title Fix _exit implementation 🐛 Fix _exit implementation Jun 8, 2024
@BennyBot
Copy link
Member

@ion098 did you test this already?

@ion098
Copy link
Contributor Author

ion098 commented Aug 30, 2024

@ion098 did you test this already?

No, I haven't been able to test this yet.

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