Re: [PATCH 18/18] flag parameters: check magic constants

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andrew Morton <akpm@...>
Cc: <linux-kernel@...>, <netdev@...>, <davidel@...>, <mtk.manpages@...>, <torvalds@...>
Date: Monday, May 12, 2008 - 11:54 pm

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andrew Morton wrote:

This means the simple approach won't work for alpha.

The question is how to solve it?  I suggest the following:

- - define SOCK_NONBLOCK to some value > 16 in include/asm-alpha/socket.h

- - add #ifndef SOCK_NONBLOCK around the definition in include/linux/net.h

- - in sys_socket, sys_socketpair, sys_paccept

   int fflags = flags;
   if (SOCK_NONBLOCK != O_NONBLOCK && (flags & SOCK_NONBLOCK)) {
     fflags &= ~SOCK_NONBLOCK;
     fflags |= O_NONBLOCK;
   }

  and use fflags instead of flags in the places where we pass it on.

This has no costs on platforms other than alpha.

Shall I sent a patch?

- --
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkgpEPoACgkQ2ijCOnn/RHQ38gCgyVOI/urGeoIr7CFIfs8C7OyR
I80AniPGGWyxZYUQg0pQlySQHqX/UYlx
=5fA2
-----END PGP SIGNATURE-----
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 18/18] flag parameters: check magic constants, Ulrich Drepper, (Tue May 6, 5:18 pm)
Re: [PATCH 18/18] flag parameters: check magic constants, Andrew Morton, (Fri May 23, 1:22 am)
Re: [PATCH 18/18] flag parameters: check magic constants, Ulrich Drepper, (Fri May 23, 10:31 am)
Re: [PATCH 18/18] flag parameters: check magic constants, Andrew Morton, (Mon May 12, 11:13 pm)
Re: [PATCH 18/18] flag parameters: check magic constants, Ulrich Drepper, (Mon May 12, 11:54 pm)
Re: [PATCH 18/18] flag parameters: check magic constants, David Miller, (Tue May 13, 12:02 am)
Re: [PATCH 18/18] flag parameters: check magic constants, Andrew Morton, (Tue May 13, 1:04 am)
Re: [PATCH 18/18] flag parameters: check magic constants, Ulrich Drepper, (Tue May 13, 1:10 am)
Re: [PATCH 18/18] flag parameters: check magic constants, Andrew Morton, (Tue May 13, 1:19 am)
Re: [PATCH 18/18] flag parameters: check magic constants, Ulrich Drepper, (Tue May 13, 1:42 am)
Re: [PATCH 18/18] flag parameters: check magic constants, Andrew Morton, (Wed May 14, 12:43 am)
Re: [PATCH 18/18] flag parameters: check magic constants, Ulrich Drepper, (Tue May 13, 12:21 am)
Re: [PATCH 18/18] flag parameters: check magic constants, David Miller, (Tue May 13, 12:39 am)
Re: [PATCH 18/18] flag parameters: check magic constants, Andrew Morton, (Tue May 13, 12:01 am)
Re: [PATCH 18/18] flag parameters: check magic constants, David Miller, (Mon May 12, 11:45 pm)