Skip to content
Snippets Groups Projects
Commit 9c70186d authored by Clément Chigot's avatar Clément Chigot Committed by Marc Poulhiès
Browse files

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
parent 358e289d
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment