This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] Ceiling priorities off by one on Linux


This patch fixes a bug in which ceiling priorities were off
by one, so that Program_Error is raised for a ceiling violation when a
task calls a protected operation and the priority of the task is equal
to the ceiling priority of the protected object. Program_Error should be
raised only if the priority of the task is greater, not greater or
equal. No test available; too nondeterministic, and requires root
privileges.

Tested on x86_64-pc-linux-gnu, committed on trunk

2017-05-02  Bob Duff  <duff@adacore.com>

	* s-taprop-linux.adb (Prio_To_Linux_Prio): New function to correctly
	compute the linux priority from the Ada priority. Call this everywhere
	required. In particular, the previous version was not doing this
	computation when setting the ceiling priority in various places. It
	was just converting to C.int, which results in a ceiling that is off
	by 1.

Attachment: difs
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]