comparison gcc/gthr-vxworks.h @ 55:77e2b8dfacca gcc-4.4.5

update it from 4.4.3 to 4.5.0
author ryoma <e075725@ie.u-ryukyu.ac.jp>
date Fri, 12 Feb 2010 23:39:51 +0900
parents a06113de4d67
children
comparison
equal deleted inserted replaced
52:c156f1bd5cd9 55:77e2b8dfacca
113 /* pthread_once is complicated enough that it's implemented 113 /* pthread_once is complicated enough that it's implemented
114 out-of-line. See config/vxlib.c. */ 114 out-of-line. See config/vxlib.c. */
115 115
116 typedef struct 116 typedef struct
117 { 117 {
118 #ifndef __RTP__ 118 #if !defined(__RTP__)
119 #if defined(__PPC__)
120 __attribute ((aligned (__alignof (unsigned))))
121 #endif
119 volatile unsigned char busy; 122 volatile unsigned char busy;
120 #endif 123 #endif
121 volatile unsigned char done; 124 volatile unsigned char done;
125 #if !defined(__RTP__) && defined(__PPC__)
126 /* PPC's test-and-set implementation requires a 4 byte aligned
127 object, of which it only sets the first byte. We use padding
128 here, in order to maintain some amount of backwards
129 compatibility. Without this padding, gthread_once objects worked
130 by accident because they happen to be static objects and the ppc
131 port automatically increased their alignment to 4 bytes. */
132 unsigned char pad1;
133 unsigned char pad2;
134 #endif
122 } 135 }
123 __gthread_once_t; 136 __gthread_once_t;
124 137
125 #ifndef __RTP__ 138 #if defined (__RTP__)
139 # define __GTHREAD_ONCE_INIT { 0 }
140 #elif defined (__PPC__)
141 # define __GTHREAD_ONCE_INIT { 0, 0, 0, 0 }
142 #else
126 # define __GTHREAD_ONCE_INIT { 0, 0 } 143 # define __GTHREAD_ONCE_INIT { 0, 0 }
127 #else
128 # define __GTHREAD_ONCE_INIT { 0 }
129 #endif 144 #endif
130 145
131 extern int __gthread_once (__gthread_once_t *__once, void (*__func)(void)); 146 extern int __gthread_once (__gthread_once_t *__once, void (*__func)(void));
132 147
133 /* Thread-specific data requires a great deal of effort, since VxWorks 148 /* Thread-specific data requires a great deal of effort, since VxWorks