I personally wouldn't change the alignment of a pthread_mutex - it is either defined properly elsewhere, or it will work OK without further alignment [or you have a bug to report to the pthread library supplier]. You trying to align it further will never make anything better - but you may break the previous alignment [gcc accepts changes in alignment, as shown in this example]:
Code:
#include <stdio.h>
typedef int foo __attribute__ ((aligned (16)));
typedef foo bar __attribute__ ((aligned (4)));
bar y;
foo x;
void xfunc(foo a, bar b)
{
foo x;
bar y;
printf("Func: x(foo) = %p, y(bar) = %p, a(foo) = %p, b(bar) = %p\n", &x, &y, &a, &b);
}
int main()
{
bar a = 7;
foo b = 8;
xfunc(a, b);
printf("Main: x(foo) = %p, y(bar) = %p, a(bar) = %p, b(foo) = %p\n", &x, &y, &a, &b);
return 0;
}
Structures (and thus classes) are ALWAYS aligned to the largest alignment needed by the structure, so aligning the WHOLE class to the same value as you have aligned one of it's members is pointless and reduntant.
Edit: On closer inspection, you also have int64 and unsigned long long members of your struct, which means that the struct itself SHOULD be aligned to 8 bytes. You are now REDUCING it's alignment (which you are allowed to do, but probably not a good idea unless you are trying to save a few bytes).
--
Mats