Synchronization problem

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
nexos
Member
Member
Posts: 1081
Joined: Tue Feb 18, 2020 3:29 pm
Libera.chat IRC: nexos

Synchronization problem

Post by nexos »

I have been trying to implement terminal scrolling for a while, and got it. But now, however it page faults after scrolling. The code is here:

Code: Select all

for(int i = 0; i < 73; i++) putchar('\n');
printf("Moved down\n");
The strange thing is, when I put the printf in another thread, it works fine. What is the problem?
Thank you for your help.
Last edited by nexos on Sat Jun 06, 2020 9:40 am, edited 1 time in total.
"How did you do this?"
"It's very simple — you read the protocol and write the code." - Bill Joy
Projects: NexNix | libnex | nnpkg
PeterX
Member
Member
Posts: 590
Joined: Fri Nov 22, 2019 5:46 am

Re: Synchronization problem

Post by PeterX »

This probably means that your code which prints '\n' is wrong. For example it might go to far/deep on the screen. Or other miscalculation.

Can you tell us perhaps where the file with that code is. I looked into your drivers dir and couldn't find it (but that may be _my_ mistake!).

EDIT: Found it! I first looked in hal not drivers!

EDIT2: After looking at the source I can't find out if the problem is in the user space library or in the kernel. Doesn't it seem a good idea to debug here?

Greetings
Peter
Post Reply