tevent: add tevent_cached_getpid() helper
authorStefan Metzmacher <metze@samba.org>
Wed, 13 Jul 2022 12:30:47 +0000 (12:30 +0000)
committerJeremy Allison <jra@samba.org>
Mon, 25 Jul 2022 17:34:33 +0000 (17:34 +0000)
commit087b1b0efda81c89493a42debcaa9013ce60cfaf
treeaeb257dbfb73f5f862ad2ddda519684894d6c4fc
parent8ff2fe33bdad605a2abfb5f3fac28b32f3211b96
tevent: add tevent_cached_getpid() helper

This avoids a getpid() syscall per tevent_loop_once() iteration.

We provide tevent_cached_getpid() also as helper for external consumers
in order to have the logic only once.

Note the change to ABI/tevent-0.12.1.sigs will be reverted
with the bump to 0.13.0.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/tevent/ABI/tevent-0.12.1.sigs
lib/tevent/tevent.c
lib/tevent/tevent.h
lib/tevent/tevent_epoll.c
lib/tevent/tevent_port.c