OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Aug 23, 2019 9:08 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Return to user process
PostPosted: Fri Aug 16, 2019 5:40 am 
Offline

Joined: Wed Jul 31, 2019 6:18 am
Posts: 4
Hello!
Earlier I asked about multitasking.
https://forum.osdev.org/viewtopic.php?f=13&t=33802
I came closer to solving the problem. I fixed all the errors in working with the stack (I think so). Now the errors do not bother me, but the fork does not return to the function in which it was called, however the retern is triggered. The process itself is in an isolated address space and is not copied to a new task. I thought that was the problem, but I was wrong. Giving access to this piece of memory, I could not solve the problem. What could be wrong??
Thus, if instead of returning from return, we switch to another kernel function, the task will work there. It turns out that the process does not know how to return to the user's task?
Code:
void main()
{
   int b = syscall_fork();   

   if(b==0)
   {
      syscall_test(b); // print uid, work's
   }
   else
   {
      syscall_test(b); // print uid, does not work
   }

   while(1){
      for (int i = 0; i < 1000000; ++i){}
      syscall_console_test_print(6);
   }
}


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

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 1 guest


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