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

Recursive functions #1

Open
ghost opened this issue Aug 16, 2016 · 1 comment
Open

Recursive functions #1

ghost opened this issue Aug 16, 2016 · 1 comment

Comments

@ghost
Copy link

ghost commented Aug 16, 2016

You keep calling functions one after the other, things keep getting pushed into the stack, but no function returns. Without the 1s delays, this code would cause a stack overflow pretty quickly.
You should just set the ready flag back to 1 in the second function and let the infinite loop in main do the calling of the scheduler.

@smartrtos
Copy link
Owner

Hi David, you are right, but this is an example to show how an OS works :)

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

No branches or pull requests

1 participant