> On Nov. 7, 2012, 1:46 p.m., Nathan Binkert wrote:
> > What exactly is the point of this?  For those that know how signals work, 
> > this is just unnecessary confusion.  If you want to centralize all signal 
> > handlers, then move them.
> 
> Andreas Sandberg wrote:
>     This came about as a way to avoid having to grep through the entire 
> source code to find unused signals when I was looking for a free signal to 
> use to control hardware virtualization. I accidentally used both SIGTMR (it's 
> not exactly obvious that/why we have a 1s timer ticking in the background) 
> and SIGUSR1 before grepping for all calls that install signal handlers. I 
> agree that the usefulness of this is currently somewhat limited since most of 
> the signals have a well defined meaning (SIGTERM, SIGABT, SIGFPE, etc.). 
> However, it will become more useful as we start to use other signals (e.g., 
> for hardware virtualization).
> 
> Nathan Binkert wrote:
>     I'd much rather see all signal handling code centralized rather than 
> defining nonstandard names for things (or provide a wrapper for signal(2) in 
> such a way that we error out if there's already a handler).  It's an accident 
> that we don't have all signal handlers in a single place anyway.
>     
>     I'm not going to put my foot down or anything, but I really think you're 
> replacing one confusion with another.

I'm with Nate on this one.  Unless we port to a non-POSIX OS this layer of 
abstraction is just overkill.  It seems like just doing all the signal handling 
in initSignals() should be enough centralization to avoid confusion.


- Steve


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviews.gem5.org/r/1530/#review3690
-----------------------------------------------------------


On Nov. 2, 2012, 10:17 a.m., Ali Saidi wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.gem5.org/r/1530/
> -----------------------------------------------------------
> 
> (Updated Nov. 2, 2012, 10:17 a.m.)
> 
> 
> Review request for Default.
> 
> 
> Description
> -------
> 
> Changeset 9355:adc19edfa256
> ---------------------------
> base: Create a central header listing all signals used within gem5
> 
> There is currently no central place where all signals used within gem5
> are listed. This patch adds a header file and with a name space
> containing constants for all signals used within gem5. This simplifies
> the task of finding a non-conflicting signal when implementing new
> functionality that requires signals.
> 
> 
> Diffs
> -----
> 
>   src/base/pollevent.cc 844f9e724343 
>   src/base/signal.hh PRE-CREATION 
>   src/sim/init.cc 844f9e724343 
> 
> Diff: http://reviews.gem5.org/r/1530/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Ali Saidi
> 
>

_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to