Thread (5 messages) 5 messages, 4 authors, 2006-01-26

Re: [PATCH 5/6] fix warning on test_ti_thread_flag()

From: Akinobu Mita <hidden>
Date: 2006-01-26 03:51:47
Also in: lkml, sparclinux

On Wed, Jan 25, 2006 at 12:02:21PM -0800, Chen, Kenneth W wrote:
Geert Uytterhoeven wrote on Wednesday, January 25, 2006 9:19 AM
quoted
quoted
I don't think you need to change the flags size.
Passing a pointer to a 32-bit entity to a function that takes a
pointer to a 64-bit entity is a classical endianness bug. So it's
better to change it, before people copy the code to a big endian
platform.
Well, x86-64 and linux-ia64 both use little endian.  I don't
understand why you are barking at us with big endian issue.
I can fix this without changing the flags size for those architectures.

1. Introduce *_le_bit() bit operations which takes void *addr
   (already I have these functions in the scope of
    HAVE_ARCH_EXT2_NON_ATOMIC_BITOPS in my patch)

2. Change flags to __u8 flags[4] or __u8 flags[8] for each architectures.

3. Use *_le_bit() in include/linux/thread_info.h
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help