Skip to content

Commit 06a5ca2

Browse files
alexcrichtontgross35
authored andcommitted
More closely align pthread type reprs
1 parent 3fb070e commit 06a5ca2

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

src/wasi/mod.rs

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,8 @@ s! {
175175
__fds: [c_int; FD_SETSIZE as usize],
176176
}
177177

178-
#[repr(align(4))]
179178
pub struct pthread_attr_t {
180-
size: [u8; 36],
179+
size: [c_long; 9],
181180
}
182181

183182
pub struct pthread_mutexattr_t {
@@ -196,24 +195,20 @@ s! {
196195
__attr: [c_uint; 2],
197196
}
198197

199-
#[repr(align(4))]
200198
pub struct pthread_cond_t {
201-
size: [u8; 48],
199+
size: [*mut c_void; 12],
202200
}
203201

204-
#[repr(align(4))]
205202
pub struct pthread_mutex_t {
206-
size: [u8; 24],
203+
size: [*mut c_void; 6],
207204
}
208205

209-
#[repr(align(4))]
210206
pub struct pthread_rwlock_t {
211-
size: [u8; 32],
207+
size: [*mut c_void; 8],
212208
}
213209

214-
#[repr(align(4))]
215210
pub struct pthread_barrier_t {
216-
size: [u8; 20],
211+
size: [*mut c_void; 5],
217212
}
218213
}
219214

0 commit comments

Comments
 (0)