OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 4:21 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Newlib signals
PostPosted: Wed Mar 22, 2017 2:58 pm 
Offline
Member
Member
User avatar

Joined: Sun Nov 20, 2016 7:26 am
Posts: 155
Location: Somewhere
Hi.

I'm working on signaling on newlib. But interestingly I couldn't find I way to signal except raise. Is there a way that I don't know to signal a task?
I don't think newlib implementation of signal only support the signal and raise.

If newlib implementation of signal only supports the signal and raise, it should be impossible send signals from kill syscall. But it's defined.
Again if it only supports signal and raise, how can I handle signals to be sent from kill?

Thanks in advance.

_________________
Keyboard not found!

Press F1 to run setup.
Press F2 to continue.


Top
 Profile  
 
 Post subject: Re: Newlib signals
PostPosted: Wed Mar 22, 2017 3:20 pm 
Offline
Member
Member
User avatar

Joined: Mon Mar 05, 2012 11:23 am
Posts: 616
Location: Germany
Hey,

I'm not sure if I understand your question correctly, but usually a signal is only raised in the own process using raise and sent to other processes using kill.

The signal implementation provided by Newlib is basically just an emulation (works only within the current process). You will have to implement real signal handling in your kernel. (http://wiki.osdev.org/Porting_Newlib#Signal_handling). It takes quite some work to implement it; the state of the interrupted process must be stored, the appropriate signal handler called in user space and then the old state must be restored once the signal handler has finished it's work.

Greets

_________________
Ghost OS - GitHub


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: Bing [Bot], DotBot [Bot] and 62 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