public inbox for libc-ports@sourceware.org
 help / color / mirror / Atom feed
* Unused sys/ucontext.h files
@ 2014-01-22  3:27 Joseph S. Myers
  2014-01-22  4:41 ` Mike Frysinger
  2014-01-28 22:43 ` Roland McGrath
  0 siblings, 2 replies; 5+ messages in thread
From: Joseph S. Myers @ 2014-01-22  3:27 UTC (permalink / raw)
  To: libc-ports; +Cc: Roland McGrath

I notice that there are files

ports/sysdeps/arm/sys/ucontext.h
ports/sysdeps/m68k/sys/ucontext.h
ports/sysdeps/mips/sys/ucontext.h

that are overridden by files in ports/sysdeps/unix/sysv/linux/<arch>, and 
so unused.  Roland, is the ARM file of use for the NaCl port, or should 
all three of those files be removed?

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Unused sys/ucontext.h files
  2014-01-22  3:27 Unused sys/ucontext.h files Joseph S. Myers
@ 2014-01-22  4:41 ` Mike Frysinger
  2014-01-22 17:14   ` Joseph S. Myers
  2014-01-28 22:43 ` Roland McGrath
  1 sibling, 1 reply; 5+ messages in thread
From: Mike Frysinger @ 2014-01-22  4:41 UTC (permalink / raw)
  To: libc-ports; +Cc: Joseph S. Myers, Roland McGrath

[-- Attachment #1: Type: Text/Plain, Size: 487 bytes --]

On Tuesday 21 January 2014 22:26:54 Joseph S. Myers wrote:
> I notice that there are files
> 
> ports/sysdeps/arm/sys/ucontext.h
> ports/sysdeps/m68k/sys/ucontext.h
> ports/sysdeps/mips/sys/ucontext.h
> 
> that are overridden by files in ports/sysdeps/unix/sysv/linux/<arch>, and
> so unused.  Roland, is the ARM file of use for the NaCl port, or should
> all three of those files be removed?

are we saying that if it's not used by Linux we're just deleting it now ?
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Unused sys/ucontext.h files
  2014-01-22  4:41 ` Mike Frysinger
@ 2014-01-22 17:14   ` Joseph S. Myers
  2014-01-22 20:40     ` Thomas Schwinge
  0 siblings, 1 reply; 5+ messages in thread
From: Joseph S. Myers @ 2014-01-22 17:14 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: libc-ports, Roland McGrath

On Tue, 21 Jan 2014, Mike Frysinger wrote:

> On Tuesday 21 January 2014 22:26:54 Joseph S. Myers wrote:
> > I notice that there are files
> > 
> > ports/sysdeps/arm/sys/ucontext.h
> > ports/sysdeps/m68k/sys/ucontext.h
> > ports/sysdeps/mips/sys/ucontext.h
> > 
> > that are overridden by files in ports/sysdeps/unix/sysv/linux/<arch>, and
> > so unused.  Roland, is the ARM file of use for the NaCl port, or should
> > all three of those files be removed?
> 
> are we saying that if it's not used by Linux we're just deleting it now ?

No, that if it's not used by any current configuration (which currently 
means Hurd or Linux) it's deleted unless it's of use in bringing up a new 
port ("generic" files, whether pure stubs or actual generic 
implementations).  And I strongly suspect these files are just files for 
whatever Unix was first supported on a given architecture - I don't really 
see advantages of such files over sysdeps/generic/sys/ucontext.h in the 
context of bringing up ports (which I expect would inevitably need 
OS-specific versions of this file in the end).

(The sysdeps/i386/sys/ucontext.h file is, I suppose, used by Hurd, but 
other <arch>/sys/ucontext.h files appear either unused, or in the am33 
case maybe really a Linux file in the wrong place.)

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Unused sys/ucontext.h files
  2014-01-22 17:14   ` Joseph S. Myers
@ 2014-01-22 20:40     ` Thomas Schwinge
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Schwinge @ 2014-01-22 20:40 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: libc-ports, Roland McGrath, Mike Frysinger

[-- Attachment #1: Type: text/plain, Size: 199 bytes --]

Hi!

On Wed, 22 Jan 2014 17:14:18 +0000, "Joseph S. Myers" <joseph@codesourcery.com> wrote:
> (The sysdeps/i386/sys/ucontext.h file is, I suppose, used by Hurd

Correct.


Grüße,
 Thomas

[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Unused sys/ucontext.h files
  2014-01-22  3:27 Unused sys/ucontext.h files Joseph S. Myers
  2014-01-22  4:41 ` Mike Frysinger
@ 2014-01-28 22:43 ` Roland McGrath
  1 sibling, 0 replies; 5+ messages in thread
From: Roland McGrath @ 2014-01-28 22:43 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: libc-ports

Yes, the sysdeps/arm file will (probably) be used by the arm-nacl
configuration.

In general, I am against removing files of this category just because
they are not used by any current configuration.  That is, files that are
machine-specific and for a machine that has some configurations in
current use, but are OS-independent.  I put them in the same category as
the stub files, most of which are not used by any configuration that can
be built.  Stubs of function implementations provide the outline of the
API and a starting point for filling in actual implementations.
Similarly, pure machine-specific files provide at least the basics of
the machine-specific API that should make sense across all OS
configurations of libc for that machine.

As with the stub implementations, there is of course always the danger
of bit rot.  As much as possible, all of libc's APIs are meant to be
independent of the underlying operating system.  That being the case,
people making API changes should endeavor to notice all the different
implementations and update them consistently.  People will forget, some
changes will be untested, etc.  But we should still be striving to
consider OS independence issues in all of our API choices.  Any time
there is an API whose only implementations that exist in our sources are
for a particular operating system, there is a much increased risk that
future changes will introduce or further enshrine assumptions about the
underlying operating system that make it more difficult (or impossible)
to implement that API elsewhere later on.


Thanks,
Roland

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-01-28 22:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-22  3:27 Unused sys/ucontext.h files Joseph S. Myers
2014-01-22  4:41 ` Mike Frysinger
2014-01-22 17:14   ` Joseph S. Myers
2014-01-22 20:40     ` Thomas Schwinge
2014-01-28 22:43 ` Roland McGrath

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).