This repository was archived by the owner on Nov 8, 2023. It is now read-only.
Commit 3bf404c
committed
sigqueue/pthread_sigqueue: cleanup.
Remove the explicit memset() from one of the two callers, and use explicit initialization for both. This makes it clearer that optimizing the zeroing of the rest of the struct is the compiler's problem, not ours.
Add the "missing" assignment to si_signo in pthread_sigqueue() that isn't actually necessary because the kernel will overwrite that field anyway when it copies from userspace, but which looked like a bug given the difference between the sigqueue() and pthread_sigqueue() implementations.
Also reuse the result of getpid() in pthread_sigqueue() rather than calling it twice.
Change-Id: I39578d80ddc5edcb7d235b078392e20f35713dba1 parent e1c232d commit 3bf404c
2 files changed
+7
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
46 | | - | |
47 | | - | |
48 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
52 | | - | |
| 54 | + | |
53 | 55 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
223 | | - | |
| 222 | + | |
224 | 223 | | |
225 | | - | |
226 | 224 | | |
227 | 225 | | |
228 | 226 | | |
| |||
0 commit comments