mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-19 10:51:00 +03:00
db7f1a91de
A function that returns with no value is a different thing from a function that doesn't return at all. Those are two orthogonal concepts, commonly confused. pthread_create(3) expects a pointer to a start routine that has a very precise prototype: void *(*start_routine)(void *); However, other thread functions, such as kernel ones, expect: void (*start_routine)(void *); Providing a different one is incorrect, and has only been working because the ABIs happen to produce a compatible function. We should use '_Noreturn void', since it's the natural type, and then provide a '_Noreturn void *' wrapper for pthread functions. For consistency, replace most cases of __NORETURN or __attribute__((noreturn)) by _Noreturn. _Noreturn is understood by -std=gnu89, so it should be safe to use everywhere. Ref: https://github.com/openzfs/zfs/pull/13110#discussion_r808450136 Ref: https://software.codidact.com/posts/285972 Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Co-authored-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com> Closes #13120 |
||
---|---|---|
.. | ||
dktp | ||
acl_impl.h | ||
acl.h | ||
callb.h | ||
cmn_err.h | ||
cred.h | ||
debug.h | ||
dkio.h | ||
dklabel.h | ||
feature_tests.h | ||
int_limits.h | ||
int_types.h | ||
inttypes.h | ||
isa_defs.h | ||
kmem.h | ||
kstat.h | ||
list_impl.h | ||
list.h | ||
Makefile.am | ||
mhd.h | ||
mkdev.h | ||
policy.h | ||
poll.h | ||
priv.h | ||
processor.h | ||
sha2.h | ||
simd.h | ||
stack.h | ||
stdtypes.h | ||
strings.h | ||
stropts.h | ||
sunddi.h | ||
systeminfo.h | ||
time.h | ||
trace_spl.h | ||
trace_zfs.h | ||
types32.h | ||
types.h | ||
tzfile.h | ||
uio.h | ||
va_list.h | ||
varargs.h | ||
vnode.h | ||
vtoc.h | ||
wmsum.h | ||
zone.h |