mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-01 10:06:57 +03:00
m68k: Enforce 4-byte alignment on internal locks (BZ #29537)
A new internal definition, __LIBC_LOCK_ALIGNMENT, is used to force the 4-byte alignment only for m68k, other architecture keep the natural alignment of the type used internally (and hppa does not require 16-byte alignment for kernel-assisted CAS). Reviewed-by: Florian Weimer <fweimer@redhat.com>
This commit is contained in:
@ -22,6 +22,7 @@
|
||||
#include <pthread.h>
|
||||
#define __need_NULL
|
||||
#include <stddef.h>
|
||||
#include <libc-lock-arch.h>
|
||||
|
||||
|
||||
/* Mutex type. */
|
||||
@ -29,7 +30,12 @@
|
||||
# if (!IS_IN (libc) && !IS_IN (libpthread)) || !defined _LIBC
|
||||
typedef struct { pthread_mutex_t mutex; } __libc_lock_recursive_t;
|
||||
# else
|
||||
typedef struct { int lock; int cnt; void *owner; } __libc_lock_recursive_t;
|
||||
typedef struct
|
||||
{
|
||||
int lock __LIBC_LOCK_ALIGNMENT;
|
||||
int cnt;
|
||||
void *owner;
|
||||
} __libc_lock_recursive_t;
|
||||
# endif
|
||||
#else
|
||||
typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t;
|
||||
|
Reference in New Issue
Block a user