lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 11 Apr 2008 13:27:54 -0700
From:	Randy Dunlap <randy.dunlap@...cle.com>
To:	Matthew Wilcox <matthew@....cx>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
	Harvey Harrison <harvey.harrison@...il.com>
Subject: Re: [DOC PATCH] semaphore documentation

On Fri, 11 Apr 2008 13:21:54 -0600 Matthew Wilcox wrote:

> On Thu, Apr 10, 2008 at 03:19:07PM -0700, Andrew Morton wrote:
> > On Thu, 10 Apr 2008 16:08:16 -0600
> > Matthew Wilcox <matthew@....cx> wrote:
> > > It seems very strange to me to document the API with the implementation
> > > rather than with the declaration.  It's almost as if we expect people to
> > > have to read the implementation to figure out how stuff works.
> > 
> > That approach makes sense for C++.  But for C, the code is .c-centric.
> 
> I've never programmed in C++ ... I just expect to find API documentation
> in header files.
> 
> > That's particularly the case with the kernel, where we explicitly work to
> > make the .c files the things which people look at, while not caring about
> > the .h files.  Look at how much we say "get that ifdef out of there and
> > hide it in the header file".
> 
> I see that as being "move the complexity around" and "get the interfaces
> right", not "hide it in the header files where nobody ever looks".
> 
> > > How about a note in semaphore.c that says "refer to semaphore.h for
> > > usage information"?
> > 
> > No, please document it in the C file, where people expect to find it.
> 
> Fine, I've done it the other way round.
> 
> Please review this doc-patch.  Without comments, I'll commit it to the
> semaphore git tree tomorrow.

Looks good to me.  Thanks.

---
~Randy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ