[Mono-dev] FW: RealTimeSignal patch

tim.jenks at realtimeworlds.com tim.jenks at realtimeworlds.com
Fri Dec 19 05:34:53 EST 2008


Further updates to patch based on comments.

> 1. Formatting.  There are still numerous cases where there isn't a
> space
> before the opening parenthesis.

My bad here, I was not familiar with the Mono Coding Guidelines, and I had misunderstood your previous comments re: spacing before parenthesis. This should now be fixed up.

> 3. mono/support/map.h needs to be updated to provide prototypes for the
> new functions in mono/support/signal.c.  Installing mono-tools (to get
> create-native-map) and running `make refresh` from mono/support will
> update mono/support/map.h for you.
> 
> BTW, do you have commit access to svn?  If not, I can handle (3) for
> you
> when I commit the patches.

I don't have commit access no :)

> > +       public struct RealTimeSignum
> > +#if NET_2_0
> > +               : IEquatable <RealTimeSignum>
> > +#endif
> > +       {
> > +               private int rt_offset;
> > +               private static readonly int MaxOffset =
> UnixSignal.GetSIGRTMAX()-UnixSignal.GetSIGRTMIN()-1;
> > +               public static readonly RealTimeSignum MinValue = new
> RealTimeSignum(0);
> > +               public static readonly RealTimeSignum MaxValue = new
> RealTimeSignum(MaxOffset);
> 
> Missing space before opening parenthesis.
> 
> Offhand, does C# guarantee the order of initialization of members?  I
> don't remember, and if the order isn't guaranteed then we'll need to
> use
> a static constructor to ensure that MaxOffset is set before setting
> MaxValue.

I think we're OK with this one; from http://msdn.microsoft.com/en-us/library/aa645757(VS.71).aspx:

`Thus, when a class is initialized, all static fields in that class are first initialized to their default values, and then the static field initializers are executed in textual order.'

Cheers
-Tim

____________________________________________________________________
DISCLAIMER

This message and any attachments contain privileged and confidential information intended for the use of the addressee named above. If you are not the intended recipient of this message, you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. Please note that we cannot guarantee that this message or any attachment is virus free or that it has not been intercepted and amended. The views of the author may not necessarily reflect those of Realtime Worlds Ltd.

 

Realtime Worlds Ltd is registered in Scotland, number 225628. Registered Office: 152 West Marketgait, Dundee, DD1 1NJ.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mcs.diff
Type: application/octet-stream
Size: 14435 bytes
Desc: mcs.diff
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20081219/8c3a05b2/attachment-0002.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mono.diff
Type: application/octet-stream
Size: 793 bytes
Desc: mono.diff
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20081219/8c3a05b2/attachment-0003.obj 


More information about the Mono-devel-list mailing list