components/gcc49/patches/002-omp-lock.h.patch
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Tue, 13 Sep 2016 13:02:35 -0700
changeset 6896 142170914c4c
parent 5205 eaff9ab86216
permissions -rw-r--r--
Added tag s12-108.1 for changeset 71ef4536e377

# Stefan Teleman <[email protected]>
# Make sure these structs are always aligned on 8.
# Internal patch. Submitted upstream. Status pending.
--- libgomp/config/posix/omp-lock.h	2008-06-06 09:01:54.000000000 -0400
+++ libgomp/config/posix/omp-lock.h	2014-11-19 08:34:08.522303786 -0500
@@ -11,13 +11,28 @@
 #include <semaphore.h>
 
 typedef pthread_mutex_t omp_lock_25_t;
-typedef struct { pthread_mutex_t lock; int count; } omp_nest_lock_25_t;
+
+typedef struct {
+  pthread_mutex_t lock;
+  int count;
+} omp_nest_lock_25_t __attribute__((__aligned__(8)));
+
 #ifdef HAVE_BROKEN_POSIX_SEMAPHORES
 /* If we don't have working semaphores, we'll make all explicit tasks
    tied to the creating thread.  */
 typedef pthread_mutex_t omp_lock_t;
-typedef struct { pthread_mutex_t lock; int count; void *owner; } omp_nest_lock_t;
+
+typedef struct {
+  pthread_mutex_t lock;
+  int count;
+  void *owner;
+} omp_nest_lock_t __attribute__((__aligned__(8)));
 #else
 typedef sem_t omp_lock_t;
-typedef struct { sem_t lock; int count; void *owner; } omp_nest_lock_t;
+typedef struct {
+  sem_t lock;
+  int count;
+  void *owner;
+} omp_nest_lock_t __attribute__((__aligned__(8)));
 #endif
+