public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* sysdeps/unix/sysv/linux directory structure question
@ 2016-11-03 17:48 Steve Ellcey
  2016-11-03 18:01 ` Joseph Myers
  0 siblings, 1 reply; 4+ messages in thread
From: Steve Ellcey @ 2016-11-03 17:48 UTC (permalink / raw)
  To: libc-alpha

I am looking at some of the consolidation patches that Yury Norov and
Adhemerval Zanella have submitted and I was wondering if anyone could
help clarify the structure of sysdeps/unix/sysv/linux for me.

Basically we have some functions defined directly in this directory and
there is also a wordsize-64 directory, presumably for <name>64 versions
of those functions.

But there is also a generic directory and some files (send.c) are
defined in the linux directory and in the linux/generic
directory.  Also the generic directory has a wordsize-32 subdirectory
(but not a wordsize-64 one).

So I have several questions.  What is the difference between
sysdeps/unix/sysv/linux and sysdeps/unix/sysv/linux/generic and why
are some files in one vs. the other vs. both?   Is generic only for 64-
bit kernels?  Is that why it has a wordsize-32 subdirectory?  Are
functions transitioning (or supposed to be transitioning) from one
directory to another?

I did look at the hierarchy convention in the glibc manual (D.2.1
Layout of the sysdeps Directory Hierarchy) but that did not help
me with these questions.

Steve Ellcey
sellcey@caviumnetworks.com

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

* Re: sysdeps/unix/sysv/linux directory structure question
  2016-11-03 17:48 sysdeps/unix/sysv/linux directory structure question Steve Ellcey
@ 2016-11-03 18:01 ` Joseph Myers
  2016-11-03 18:12   ` Steve Ellcey
  0 siblings, 1 reply; 4+ messages in thread
From: Joseph Myers @ 2016-11-03 18:01 UTC (permalink / raw)
  To: Steve Ellcey; +Cc: libc-alpha

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

On Thu, 3 Nov 2016, Steve Ellcey wrote:

> So I have several questions.  What is the difference between
> sysdeps/unix/sysv/linux and sysdeps/unix/sysv/linux/generic and why
> are some files in one vs. the other vs. both?   Is generic only for 64-

generic is for newer architectures using the generic syscall ABI, where 
syscalls that can be implemented in terms of newer syscalls are generally 
omitted (so only statat syscalls not the older stat ones, for example), 
and where structures are the same between different architectures as far 
as possible (whereas various structures on older architectures commonly 
tried to follow the layout used by some proprietary Unix on that 
architecture).

> bit kernels?  Is that why it has a wordsize-32 subdirectory?  Are

The generic syscall ABI only has 64-bit versions of various structures, 
with 32-bit architectures expected to do EOVERFLOW handling in userspace.

-- 
Joseph S. Myers
joseph@codesourcery.com

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

* Re: sysdeps/unix/sysv/linux directory structure question
  2016-11-03 18:01 ` Joseph Myers
@ 2016-11-03 18:12   ` Steve Ellcey
  2016-11-03 18:32     ` Adhemerval Zanella
  0 siblings, 1 reply; 4+ messages in thread
From: Steve Ellcey @ 2016-11-03 18:12 UTC (permalink / raw)
  To: Joseph Myers; +Cc: libc-alpha

On Thu, 2016-11-03 at 18:01 +0000, Joseph Myers wrote:
> On Thu, 3 Nov 2016, Steve Ellcey wrote:
> 
> > 
> > So I have several questions.  What is the difference between
> > sysdeps/unix/sysv/linux and sysdeps/unix/sysv/linux/generic and why
> > are some files in one vs. the other vs. both?   Is generic only for
> > 64-
> generic is for newer architectures using the generic syscall ABI,
> where 
> syscalls that can be implemented in terms of newer syscalls are
> generally 
> omitted (so only statat syscalls not the older stat ones, for
> example), 
> and where structures are the same between different architectures as
> far 
> as possible (whereas various structures on older architectures
> commonly 
> tried to follow the layout used by some proprietary Unix on that 
> architecture).
> 
> > 
> > bit kernels?  Is that why it has a wordsize-32 subdirectory?  Are
> The generic syscall ABI only has 64-bit versions of various
> structures, 
> with 32-bit architectures expected to do EOVERFLOW handling in
> userspace.

So this use of 'generic' is different than the 'sysdeps/generic'
directory.  I.e. sysdeps/generics is automatically added to the end of
the sysdep directory search list, but 'sysdeps/unix/sysv/linux/generic'
is only going to be used if it appears in a targets Implies file.  Is
that correct?

Steve Ellcey
sellcey@caviumnetworks.com

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

* Re: sysdeps/unix/sysv/linux directory structure question
  2016-11-03 18:12   ` Steve Ellcey
@ 2016-11-03 18:32     ` Adhemerval Zanella
  0 siblings, 0 replies; 4+ messages in thread
From: Adhemerval Zanella @ 2016-11-03 18:32 UTC (permalink / raw)
  To: libc-alpha



On 03/11/2016 16:12, Steve Ellcey wrote:
> On Thu, 2016-11-03 at 18:01 +0000, Joseph Myers wrote:
>> On Thu, 3 Nov 2016, Steve Ellcey wrote:
>>
>>>
>>> So I have several questions.  What is the difference between
>>> sysdeps/unix/sysv/linux and sysdeps/unix/sysv/linux/generic and why
>>> are some files in one vs. the other vs. both?   Is generic only for
>>> 64-
>> generic is for newer architectures using the generic syscall ABI,
>> where 
>> syscalls that can be implemented in terms of newer syscalls are
>> generally 
>> omitted (so only statat syscalls not the older stat ones, for
>> example), 
>> and where structures are the same between different architectures as
>> far 
>> as possible (whereas various structures on older architectures
>> commonly 
>> tried to follow the layout used by some proprietary Unix on that 
>> architecture).
>>
>>>
>>> bit kernels?  Is that why it has a wordsize-32 subdirectory?  Are
>> The generic syscall ABI only has 64-bit versions of various
>> structures, 
>> with 32-bit architectures expected to do EOVERFLOW handling in
>> userspace.
> 
> So this use of 'generic' is different than the 'sysdeps/generic'
> directory.  I.e. sysdeps/generics is automatically added to the end of
> the sysdep directory search list, but 'sysdeps/unix/sysv/linux/generic'
> is only going to be used if it appears in a targets Implies file.  Is
> that correct?

Yes, my understanding is 'sysdeps/generics' is glibc defined internal 
semantics, where the linux/generic means the kernel abi (recall that
glibc still supports non-linux targets).

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

end of thread, other threads:[~2016-11-03 18:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-03 17:48 sysdeps/unix/sysv/linux directory structure question Steve Ellcey
2016-11-03 18:01 ` Joseph Myers
2016-11-03 18:12   ` Steve Ellcey
2016-11-03 18:32     ` Adhemerval Zanella

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).