src/nss-systemd/nss-systemd.h
raw| 1 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
| 2 | #pragma once |
| 3 | |
| 4 | #include "shared-forward.h" |
| 5 | |
| 6 | int _nss_systemd_block(bool b); |
| 7 | bool _nss_systemd_is_blocked(void); |
| 8 | |
| 9 | /* For use with the _cleanup_() macro */ |
| 10 | static inline void _nss_systemd_unblockp(bool *b) { |
| 11 | if (*b) |
| 12 | assert_se(_nss_systemd_block(false) >= 0); |
| 13 | } |