Skip to content

Commit 31c4e34

Browse files
committed
posix: signal: reduce padding in sigevent sigval
The sigevent struct and sigval union members were previously not ordered in a way that produces optimal alignment / reduces padding on 64-bit systems. Reorder members so that pointers come first. Signed-off-by: Christopher Friedt <[email protected]>
1 parent 18c23de commit 31c4e34

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/zephyr/posix/signal.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,16 @@ typedef struct {
8080
typedef int sig_atomic_t; /* Atomic entity type (ANSI) */
8181

8282
union sigval {
83-
int sival_int;
8483
void *sival_ptr;
84+
int sival_int;
8585
};
8686

8787
struct sigevent {
88-
int sigev_notify;
89-
int sigev_signo;
90-
union sigval sigev_value;
9188
void (*sigev_notify_function)(union sigval val);
9289
pthread_attr_t *sigev_notify_attributes;
90+
union sigval sigev_value;
91+
int sigev_notify;
92+
int sigev_signo;
9393
};
9494

9595
#ifdef CONFIG_POSIX_SIGNAL

0 commit comments

Comments
 (0)