@@ -959,8 +959,7 @@ export namespace errno {
959
959
}
960
960
export type errno = u16 ;
961
961
962
- /** An event that occurred. */
963
- @unmanaged export abstract class event {
962
+ @unmanaged abstract class $event { // size=16/32
964
963
/** User-provided value that got attached to `subscription#userdata`. */
965
964
userdata : userdata ;
966
965
/** If non-zero, an error that occurred while processing the subscription request. */
@@ -971,8 +970,14 @@ export type errno = u16;
971
970
private __padding0 : u16 ;
972
971
}
973
972
973
+ /** An event that occurred. */
974
+ @unmanaged export abstract class event extends $event {
975
+ private __padding1 : u64 ;
976
+ private __padding2 : u64 ;
977
+ }
978
+
974
979
/** An event that occurred when type is `eventtype.FD_READ` or `eventtype.FD_WRITE`. */
975
- @unmanaged export class event_fd_readwrite extends event {
980
+ @unmanaged export class event_fd_readwrite extends $ event {
976
981
/* The number of bytes available for reading or writing. */
977
982
nbytes : filesize ;
978
983
/* The state of the file descriptor. */
@@ -1187,14 +1192,18 @@ export namespace preopentype {
1187
1192
}
1188
1193
export type preopentype = u8 ;
1189
1194
1190
- /* Information about a pre-opened capability. */
1191
- export abstract class prestat {
1195
+ @unmanaged abstract class $prestat { // WASM32: size=1/8, WASM64: size=1/16
1192
1196
/* The type of the pre-opened capability. */
1193
1197
type : preopentype ;
1194
1198
}
1195
1199
1200
+ /* Information about a pre-opened capability. */
1201
+ @unmanaged export abstract class prestat extends $prestat {
1202
+ private __padding0 : usize ;
1203
+ }
1204
+
1196
1205
/** The contents of a $prestat when type is `preopentype.DIR`. */
1197
- export class prestat_dir extends prestat {
1206
+ @ unmanaged export class prestat_dir extends $ prestat {
1198
1207
/** The length of the directory name for use with `fd_prestat_dir_name`. */
1199
1208
name_len : usize ;
1200
1209
}
@@ -1491,8 +1500,7 @@ export namespace subclockflags {
1491
1500
}
1492
1501
export type subclockflags = u16 ;
1493
1502
1494
- /** Subscription to an event. */
1495
- @unmanaged export abstract class subscription {
1503
+ @unmanaged abstract class $subscription { // size=16/48
1496
1504
/** User-provided value that is attached to the subscription. */
1497
1505
userdata : userdata ;
1498
1506
/** The type of the event to which to subscribe. */
@@ -1501,8 +1509,16 @@ export type subclockflags = u16;
1501
1509
private __padding0 : u32 ;
1502
1510
}
1503
1511
1512
+ /** Subscription to an event. */
1513
+ @unmanaged export abstract class subscription extends $subscription {
1514
+ private __padding1 : u64 ;
1515
+ private __padding2 : u64 ;
1516
+ private __padding3 : u64 ;
1517
+ private __padding4 : u64 ;
1518
+ }
1519
+
1504
1520
/* Subscription to an event of type `eventtype.CLOCK`.**/
1505
- @unmanaged export class subscription_clock extends subscription {
1521
+ @unmanaged export class subscription_clock extends $ subscription {
1506
1522
/** The clock against which to compare the timestamp. */
1507
1523
clock_id : clockid ;
1508
1524
/** The absolute or relative timestamp. */
@@ -1516,9 +1532,13 @@ export type subclockflags = u16;
1516
1532
}
1517
1533
1518
1534
/* Subscription to an event of type `eventtype.FD_READ` or `eventtype.FD_WRITE`.**/
1519
- @unmanaged export class subscription_fd_readwrite extends subscription {
1535
+ @unmanaged export class subscription_fd_readwrite extends $ subscription {
1520
1536
/** The file descriptor on which to wait for it to become ready for reading or writing. */
1521
1537
file_descriptor : fd ;
1538
+
1539
+ private __padding1 : u64 ;
1540
+ private __padding2 : u64 ;
1541
+ private __padding3 : u64 ;
1522
1542
}
1523
1543
1524
1544
/** Timestamp in nanoseconds. */
0 commit comments