lkml.org 
[lkml]   [2006]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][RFC] splice support
>> 
>> - splice() take a size_t length. Should it be taking a 64-bit length?
>
>No. You can't splice more than the kernel buffers anyway (ie currently
>PIPE_BUFFERS pages, ie ~64kB, although in theory somebody could use large
>pages for it), so 64-bit would be total overkill.
>
So unsigned int would be enough, would not it?


>> - why is the `flags' arg to sys_splice() unsigned long? Can it be `int'?
>
>flags are always unsigned long, haven't you noticed? [...]

On x86, an unsigned long holds 32 bit, so we can at most put 32 flags in a
'flags' argument, even on x64 -- to stay compatible/deterministic/you know.
So it sounds like a good thing to make it 'unsigned int' rather than
'unsigned long'. Saves stack space.


>> - All the operations do foo(in, out, ...). It's a bit more conventional
>> to do foo(out, in, ...).

man bzero(3)
man swab(3)
man bcopy(3)

It's not (out,in) everywhere. But there are also other extremes, like
outb() where (val,port) is rather confusing compared to the rest of the
world (port,val).



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

\
 
 \ /
  Last update: 2006-03-30 10:11    [W:0.164 / U:1.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site