diff options
author | Andrey Fomichev <andrey.fomichev@gmail.com> | 2022-02-10 16:49:15 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:15 +0300 |
commit | 1c61afbf3db63940d05e6fefa3104b03457788a1 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /util/system/sigset.h | |
parent | e542cc14db4240643a06bb0dde87ecf361f101ab (diff) | |
download | ydb-1c61afbf3db63940d05e6fefa3104b03457788a1.tar.gz |
Restoring authorship annotation for Andrey Fomichev <andrey.fomichev@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'util/system/sigset.h')
-rw-r--r-- | util/system/sigset.h | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/util/system/sigset.h b/util/system/sigset.h index ff9fa44c15..8dd02fd817 100644 --- a/util/system/sigset.h +++ b/util/system/sigset.h @@ -1,78 +1,78 @@ #pragma once - -// Functions for manipulating signal sets - + +// Functions for manipulating signal sets + #include "compat.h" - -#if defined _unix_ + +#if defined _unix_ #include <pthread.h> -#elif defined _win_ +#elif defined _win_ // Flags for sigprocmask: #define SIG_BLOCK 1 #define SIG_UNBLOCK 2 #define SIG_SETMASK 3 - + using sigset_t = ui32; - -#else + +#else #error not supported yet -#endif - +#endif + inline int SigEmptySet(sigset_t* set) { -#if defined _unix_ +#if defined _unix_ return sigemptyset(set); -#else +#else Y_UNUSED(set); return 0; -#endif -} - +#endif +} + inline int SigFillSet(sigset_t* set) { -#if defined _unix_ +#if defined _unix_ return sigfillset(set); -#else +#else Y_UNUSED(set); return 0; -#endif -} - +#endif +} + inline int SigAddSet(sigset_t* set, int signo) { -#if defined _unix_ +#if defined _unix_ return sigaddset(set, signo); -#else +#else Y_UNUSED(set); Y_UNUSED(signo); return 0; -#endif -} - +#endif +} + inline int SigDelSet(sigset_t* set, int signo) { -#if defined _unix_ +#if defined _unix_ return sigdelset(set, signo); -#else +#else Y_UNUSED(set); Y_UNUSED(signo); return 0; -#endif -} - +#endif +} + inline int SigIsMember(const sigset_t* set, int signo) { -#if defined _unix_ +#if defined _unix_ return sigismember(const_cast<sigset_t*>(set), signo); -#else +#else Y_UNUSED(set); Y_UNUSED(signo); return 0; -#endif -} - +#endif +} + inline int SigProcMask(int how, const sigset_t* set, sigset_t* oset) { -#if defined _unix_ - return pthread_sigmask(how, set, oset); -#else +#if defined _unix_ + return pthread_sigmask(how, set, oset); +#else Y_UNUSED(set); Y_UNUSED(oset); Y_UNUSED(how); - return 0; -#endif -} + return 0; +#endif +} |