-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Raise PE on potentially-blocking operation in PO.
* common/a-retide.adb (Delay_Until): raise PE if within a PO. * common/s-taprob.adb: updated comments to note that this is a restricted profile, so Detect_Blocking can be assumed, even absent the pragma. * test-stm32f4/delay_in_po-main.adb, test-stm32f4/delay_in_po.adb, test-stm32f4/delay_in_po.ads: demonstrate that blocking is detected. * test-stm32f4/testbed.gpr: add delay_in_po test.
- Loading branch information
1 parent
37663e5
commit ed88765
Showing
6 changed files
with
94 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
-- Copyright (C) 2020 Free Software Foundation, Inc. | ||
|
||
-- This file is part of the Cortex GNAT RTS package. | ||
-- | ||
-- Copying and distribution of this file, with or without | ||
-- modification, are permitted in any medium without royalty provided | ||
-- the copyright notice and this notice are preserved. This file is | ||
-- offered as-is, without any warranty. | ||
|
||
procedure Delay_In_PO.Main is | ||
begin | ||
PO.Potentially_Blocking; | ||
end Delay_In_PO.Main; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
-- Copyright (C) 2020 Free Software Foundation, Inc. | ||
|
||
-- This file is part of the Cortex GNAT RTS package. | ||
-- | ||
-- Copying and distribution of this file, with or without | ||
-- modification, are permitted in any medium without royalty provided | ||
-- the copyright notice and this notice are preserved. This file is | ||
-- offered as-is, without any warranty. | ||
|
||
with Ada.Real_Time; | ||
|
||
package body Delay_In_PO is | ||
|
||
protected body PO is | ||
|
||
procedure Potentially_Blocking is | ||
begin | ||
delay until Ada.Real_Time.Time_Last; | ||
end Potentially_Blocking; | ||
|
||
end PO; | ||
|
||
end Delay_In_PO; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
-- Copyright (C) 2020 Free Software Foundation, Inc. | ||
|
||
-- This file is part of the Cortex GNAT RTS package. | ||
-- | ||
-- Copying and distribution of this file, with or without | ||
-- modification, are permitted in any medium without royalty provided | ||
-- the copyright notice and this notice are preserved. This file is | ||
-- offered as-is, without any warranty. | ||
|
||
-- The purpose of this little suite is to provoke Program_Error by a | ||
-- 'delay until' inside a protected object. | ||
|
||
package Delay_In_PO is | ||
|
||
protected PO is | ||
procedure Potentially_Blocking; | ||
end PO; | ||
|
||
end Delay_In_PO; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters