login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
May
»
6
Re: [PATCH 02/18] flag parameters: socket and socketpair
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Davide Libenzi
Subject:
Re: [PATCH 02/18] flag parameters: socket and socketpair
Date: Monday, May 5, 2008 - 7:13 pm
On Mon, 5 May 2008, Andrew Morton wrote:
quoted text
> On Sun, 4 May 2008 23:42:46 -0400 Ulrich Drepper <drepper@redhat.com> wrote: > > > +static const struct flags_rmap sock_file_flags_remap[] = { > > + { SOCK_CLOEXEC, O_CLOEXEC }, > > +}; > > + > > asmlinkage long sys_socket(int family, int type, int protocol) > > { > > int retval; > > struct socket *sock; > > + int fflags; > > + > > + type = flags_remap(sock_file_flags_remap, > > + ARRAY_SIZE(sock_file_flags_remap), > > + type, &fflags); > > oh, so that's what it does. > > afaict we only ever remap one or two flags. Would it not be more efficient > to do that inline? Something along the lines of: > > type = flag_remap(type, &fflags, SOCK_whatever, O_whatever); > type = flag_remap(type, &fflags, SOCK_whatever2, O_whatever2); > > ?
I think it is better to keep it able to remap more than one flag, with a single call, that is table driven. - Davide --
unsubscribe notice
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/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH 02/18] flag parameters: socket and socketpair
, Ulrich Drepper
, (Sun May 4, 8:42 pm)
Re: [PATCH 02/18] flag parameters: socket and socketpair
, YOSHIFUJI Hideaki /
, (Sun May 4, 9:24 pm)
Re: [PATCH 02/18] flag parameters: socket and socketpair
, Ulrich Drepper
, (Sun May 4, 10:00 pm)
Re: [PATCH 02/18] flag parameters: socket and socketpair
, David Miller
, (Mon May 5, 1:11 am)
Re: [PATCH 02/18] flag parameters: socket and socketpair
, Andrew Morton
, (Mon May 5, 6:58 pm)
Re: [PATCH 02/18] flag parameters: socket and socketpair
, Davide Libenzi
, (Mon May 5, 7:13 pm)
Re: [PATCH 02/18] flag parameters: socket and socketpair
, Andrew Morton
, (Mon May 5, 7:17 pm)
Re: [PATCH 02/18] flag parameters: socket and socketpair
, Davide Libenzi
, (Mon May 5, 7:30 pm)
Re: [PATCH 02/18] flag parameters: socket and socketpair
, Ulrich Drepper
, (Mon May 5, 7:33 pm)
Re: [PATCH 02/18] flag parameters: socket and socketpair
, Andrew Morton
, (Mon May 5, 7:42 pm)
Re: [PATCH 02/18] flag parameters: socket and socketpair
, Ulrich Drepper
, (Mon May 5, 7:58 pm)
Re: [PATCH 02/18] flag parameters: socket and socketpair
, Ulrich Drepper
, (Mon May 5, 8:02 pm)
Re: [PATCH 02/18] flag parameters: socket and socketpair
, Andrew Morton
, (Mon May 5, 8:05 pm)
Re: [PATCH 02/18] flag parameters: socket and socketpair