diff options
author | Clément Chigot <chigot@adacore.com> | 2023-06-13 10:51:17 +0200 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2023-07-28 09:28:15 +0200 |
commit | 9c70186d84b895340771fcf9df54e3ed6f1a4e48 (patch) | |
tree | 57392b7f5cb86188db6a9428e5a7ac6e757e7531 /gcc | |
parent | 358e289d37b011ff113f5c70dee777c15679743a (diff) | |
download | gcc-9c70186d84b895340771fcf9df54e3ed6f1a4e48.zip gcc-9c70186d84b895340771fcf9df54e3ed6f1a4e48.tar.gz gcc-9c70186d84b895340771fcf9df54e3ed6f1a4e48.tar.bz2 |
ada: Add an assert in Posix Interrupt_Wait
All functions but Interrupt_Wait in s-inmaop__posix are checking the
result of their syscalls with an assert. However, any return code of
sigwait different than 0 means that something went wrong for it.
From sigwait man:
> RETURN VALUE
> On success, sigwait() returns 0. On error, it returns a
> positive error number (listed in ERRORS).
gcc/ada/
* libgnarl/s-inmaop__posix.adb: Add assert after sigwait in
Interrupt_Wait
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/libgnarl/s-inmaop__posix.adb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/ada/libgnarl/s-inmaop__posix.adb b/gcc/ada/libgnarl/s-inmaop__posix.adb index 3171399..e4d07ee 100644 --- a/gcc/ada/libgnarl/s-inmaop__posix.adb +++ b/gcc/ada/libgnarl/s-inmaop__posix.adb @@ -135,6 +135,7 @@ package body System.Interrupt_Management.Operations is begin Result := sigwait (Mask, Sig'Access); + pragma Assert (Result = 0); if Result /= 0 then return 0; |