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
- To: <cygwin-patches at sourceware dot cygnus dot com>
- Subject: RE: [PATCH] Move per_thread::set() def from fork.cc to perthread.h
- From: "Gary R. Van Sickle" <g dot r dot vansickle at worldnet dot att dot net>
- Date: Sun, 14 Oct 2001 08:58:58 -0500
> > 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.
But as this is my first patch to cygwin proper, I wanted to "test the
waters" and not get too ambitious and create a perthread.cc, work it into
the build, fill out forms, risk rejection because there's some obvious
reason why it is in the header, etc etc; maybe that'll be in my second patch
;-).