Fix pointer alignment bug causing SIGBUS on Sparc64
authorSébastien Bouchex Bellomié <sbouchex@infovista.com>
Tue, 11 Mar 2014 14:54:27 +0000 (08:54 -0600)
committerJens Axboe <axboe@fb.com>
Tue, 11 Mar 2014 14:54:27 +0000 (08:54 -0600)
commitc46fda904f38a66f5f68a4b766438c09ef8cddcc
tree39ca70701d9a53b33533126794c6d8846ca05226
parentb24f59ab5ac96a67a016dc921687b0feae9bbf94
Fix pointer alignment bug causing SIGBUS on Sparc64

OK, the issue was related to the alignment issue between the
thread_options structure and its "packed" version : The lexxx_to_cpu
macros are incorrectly casting the pointers and that causes an bus
error.  I have fixed the issue by avoid casting the pointers and calling
directly the "swap" method.

I have also included a fixed on the thread_options structure regarding
the ddir_seq_add variable : Its length was incorrect.

Signed-off-by: Jens Axboe <axboe@fb.com>
os/os.h
thread_options.h