diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-02-08 12:21:58 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-02-08 12:35:27 +0900 |
commit | a56d959ed5d99e602f2bb05bbeb46a1b1b146cd9 (patch) | |
tree | 3ee25a2bee4c1ac743bc86095471d7b1242f2243 /thread_sync.c | |
parent | fefe37f98dc347ed372597975a327f3c1425c556 (diff) |
Replace `PACKED_STRUCT` and `PACKED_STRUCT_UNALIGNED`
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/7268
Diffstat (limited to 'thread_sync.c')
-rw-r--r-- | thread_sync.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/thread_sync.c b/thread_sync.c index 74a26bd0ac..9a3a6c1ba7 100644 --- a/thread_sync.c +++ b/thread_sync.c @@ -652,22 +652,24 @@ rb_mutex_allow_trap(VALUE self, int val) #define queue_waitq(q) UNALIGNED_MEMBER_PTR(q, waitq) #define queue_list(q) UNALIGNED_MEMBER_PTR(q, que) -PACKED_STRUCT_UNALIGNED(struct rb_queue { +RBIMPL_ATTR_PACKED_STRUCT_UNALIGNED_BEGIN() +struct rb_queue { struct ccan_list_head waitq; rb_serial_t fork_gen; const VALUE que; int num_waiting; -}); +} RBIMPL_ATTR_PACKED_STRUCT_UNALIGNED_END(); #define szqueue_waitq(sq) UNALIGNED_MEMBER_PTR(sq, q.waitq) #define szqueue_list(sq) UNALIGNED_MEMBER_PTR(sq, q.que) #define szqueue_pushq(sq) UNALIGNED_MEMBER_PTR(sq, pushq) -PACKED_STRUCT_UNALIGNED(struct rb_szqueue { +RBIMPL_ATTR_PACKED_STRUCT_UNALIGNED_BEGIN() +struct rb_szqueue { struct rb_queue q; int num_waiting_push; struct ccan_list_head pushq; long max; -}); +} RBIMPL_ATTR_PACKED_STRUCT_UNALIGNED_END(); static void queue_mark(void *ptr) |