OSDev.org

The Place to Start for Operating System Developers
It is currently Tue Apr 23, 2024 10:46 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Synchronization problem
PostPosted: Sat Jun 06, 2020 9:13 am 
Offline
Member
Member

Joined: Tue Feb 18, 2020 3:29 pm
Posts: 1071
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:
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.

_________________
"How did you do this?"
"It's very simple — you read the protocol and write the code." - Bill Joy
Projects: NexNix | libnex | nnpkg


Last edited by nexos on Sat Jun 06, 2020 9:40 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Synchronization problem
PostPosted: Sat Jun 06, 2020 9:35 am 
Offline
Member
Member

Joined: Fri Nov 22, 2019 5:46 am
Posts: 590
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: DotBot [Bot], Majestic-12 [Bot] and 117 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group