login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
August
»
30
Re: aligned_{u64,be64,le64} defined in #ifdef __KERNEL__
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Jan Engelhardt
Subject:
Re: aligned_{u64,be64,le64} defined in #ifdef __KERNEL__
Date: Monday, August 30, 2010 - 6:02 am
On Monday 2010-08-30 12:58, Andreas Gruenbacher wrote:
quoted text
> >> If we want a version of this type visible to userspace, it needs to, >> for example, have double underscores prepended to the type name just >> as we do for things like __u16 and __u32. > >How about something like this?
I like that approach:
quoted text
>From 3bec018a4835d4fdbe35595366a51bd09e3cc1d0 Mon Sep 17 00:00:00 2001 >From: Andreas Gruenbacher <agruen@suse.de> >Date: Mon, 30 Aug 2010 12:51:01 +0200 >Subject: [PATCH] Define __aligned_{u64,le64,be64} types with 8-byte alignment > >Convert the existing #defines into typedefs, prepend two underscores to >avoid POSIX namespace pollution, and expose the types to user space. > >These types are useful for enforcing the same alignment on 32-bit and >64-bit architectures. (Some 32-bit architectures only align 64-bit >values on 4-byte boundaries by default.) > >(The aligned types are used by some netfilter user-space headers >already.) > >Signed-off-by: Andreas Gruenbacher <agruen@suse.de> >--- > include/linux/if_ppp.h | 16 +++++++------- > include/linux/netfilter/nfnetlink_log.h | 4 +- > include/linux/netfilter/nfnetlink_queue.h | 4 +- > include/linux/netfilter/xt_connbytes.h | 4 +- > include/linux/netfilter/xt_quota.h | 2 +- > include/linux/types.h | 10 ++++---- > include/scsi/scsi_tgt_if.h | 30 ++++++++++++++-------------- > include/xen/interface/hvm/hvm_op.h | 2 +- > 8 files changed, 36 insertions(+), 36 deletions(-) > >diff --git a/include/linux/if_ppp.h b/include/linux/if_ppp.h >index fcef103..c9ad383 100644 >--- a/include/linux/if_ppp.h >+++ b/include/linux/if_ppp.h >@@ -114,14 +114,14 @@ struct pppol2tp_ioc_stats { > __u16 tunnel_id; /* redundant */ > __u16 session_id; /* if zero, get tunnel stats */ > __u32 using_ipsec:1; /* valid only for session_id == 0 */ >- aligned_u64 tx_packets; >- aligned_u64 tx_bytes; >- aligned_u64 tx_errors; >- aligned_u64 rx_packets; >- aligned_u64 rx_bytes; >- aligned_u64 rx_seq_discards; >- aligned_u64 rx_oos_packets; >- aligned_u64 rx_errors; >+ __aligned_u64 tx_packets; >+ __aligned_u64 tx_bytes; >+ __aligned_u64 tx_errors; >+ __aligned_u64 rx_packets; >+ __aligned_u64 rx_bytes; >+ __aligned_u64 rx_seq_discards; >+ __aligned_u64 rx_oos_packets; >+ __aligned_u64 rx_errors;
--
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 -v2] fanotify: drops the packed attribute from user ...
, Eric Paris
, (Tue Aug 24, 1:43 pm)
Re: [PATCH -v2] fanotify: drops the packed attribute from ...
, Eric Paris
, (Fri Aug 27, 4:51 pm)
aligned_{u64,be64,le64} defined in #ifdef __KERNEL__
, Andreas Gruenbacher
, (Sun Aug 29, 6:26 pm)
Re: aligned_{u64,be64,le64} defined in #ifdef __KERNEL__
, David Miller
, (Sun Aug 29, 9:21 pm)
Re: aligned_{u64,be64,le64} defined in #ifdef __KERNEL__
, Andreas Gruenbacher
, (Mon Aug 30, 3:58 am)
Re: aligned_{u64,be64,le64} defined in #ifdef __KERNEL__
, Jan Engelhardt
, (Mon Aug 30, 6:02 am)
Re: aligned_{u64,be64,le64} defined in #ifdef __KERNEL__
, David Miller
, (Mon Aug 30, 6:42 pm)
Re: aligned_{u64,be64,le64} defined in #ifdef __KERNEL__
, Jan Engelhardt
, (Tue Oct 5, 11:05 pm)
Re: aligned_{u64,be64,le64} defined in #ifdef __KERNEL__
, David Miller
, (Tue Oct 5, 11:10 pm)
Re: aligned_{u64,be64,le64} defined in #ifdef __KERNEL__
, Iain Paton
, (Mon Dec 13, 3:04 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Paul Turner
[tg_shares_up rewrite v4 11/11] sched: update tg->shares after cpu.shares write
Mr. James W. Laferriere
Re: Linux 2.6.25-rc1 , syntax error near unexpected token `;'
Robin Lee Powell
NFS hang + umount -f: better behaviour requested.
Linus Torvalds
Linux 2.6.34-rc4
Colin Cross
[PATCH 12/21] ARM: tegra: Add suspend and hotplug support
git
:
Fredrik Kuivinen
Re: fatal: unable to create '.git/index': File exists
Wink Saville
How-to combine several separate git repos?
Emily Ren
How to pull remote branch with specified commit id?
Denis Bueno
Git clone error
pradeep singh
git-update-server-info may be required,cannot clone and pull from a remote reposit...
openbsd-misc
:
Sevan / Venture37
Re: This is what Linus Torvalds calls openBSD crowd
Netmaffia.hu
Tini Lányok AKCIÓBAN OTTHON
Siju George
This is what Linus Torvalds calls openBSD crowd
Darrin Chandler
Re: OT: Python (was Re: vi in /bin)
frantisek holop
Re: splassert: vwakeup: and friends
linux-netdev
:
Jamie Lokier
Re: POHMELFS high performance network filesystem. Transactions, failover, performa...
Timo Teräs
ip xfrm policy semantics
Ron Mercer
[net-next PATCH 2/2] qlge: Version change to v1.00.00.27
Maciej W. Rozycki
Re: [PATCH] flush_work_sync vs. flush_scheduled_work Re: [PATCH] PHYLIB: IRQ event...
Jarek Poplawski
Re: socket api problem: can't bind an ipv6 socket to ::ffff:0.0.0.0
git-commits-head
:
Linux Kernel Mailing List
powerpc/fsl_msi: enable msi allocation in all banks
Linux Kernel Mailing List
ASoC: fix registration of the SoC card in the Freescale MPC8610 drivers
Linux Kernel Mailing List
drivers/acpi: use kasprintf
Linux Kernel Mailing List
bnx2x: Moving includes
Linux Kernel Mailing List
[ARM] mmp: add dma support to mmp2
Colocation donated by:
Syndicate