|
Message-ID:
<OS3PR01MB557688F859612EEF849912F6ECB99@OS3PR01MB5576.jpnprd01.prod.outlook.com>
Date: Mon, 27 Jun 2022 15:49:04 +0000
From: 张 译仁 <zyr_ms@...look.com>
To: "musl@...ts.openwall.com" <musl@...ts.openwall.com>
Subject: Confused length of `sigset_t`
When supporting signal handling for my tiny OS, I notice that the defination of `sigset_t` which is used in signal handling is weird.
```
// include/alltypes.h.in
TYPEDEF struct __sigset_t { unsigned long __bits[128/sizeof(long)]; } sigset_t;
```
128 bytes (16 * long) are used for sigmask when 128 bits (2 * long) is enough.
Why? For strange compatibility? In my opinion, `unsigned long __bits[128/sizeof(long)/8]` is more reasonable.
Content of type "text/html" skipped
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.