This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
Re: [PATCH] Move per_thread::set() def from fork.cc to perthread.h
On Sun, Oct 14, 2001 at 08:58:58AM -0500, Gary R. Van Sickle wrote:
>> > Sun Oct 14 08:10:12 2001 Gary R. Van Sickle
>> >
>> > * perthread.h (per_thread::set): Move per_thread::set()
>> > definition from fork.cc to perthread.h, where the rest of
>> > per_thread resides.
>>
>> Why? I thought virtual functions could not inline, so there is no
>> potential performance benefit to putting the code in the header, and
>> headers usually do not have the actual implementation of the function
>> (barring inline functions).
>
>The idea isn't to get it into the header, but rather to get it out of
>fork.cc, where it doesn't belong. Currently, there is no perthread.cc; the
>entire per_thread class is implemented in the header. I agree, there's most
>likely no reason this shouldn't be in a .cc file.
I agree with Robert that putting this is in the header doesn't seem like
the right thing to do. It's in fork.cc primarily because I wanted it
to be in a .cc file for debugging purposes.
I have checked in your debug change fix, though. Thanks.
cgf