From 90707ac1bbeaa670d0a93de3f4299254dd4579c9 Mon Sep 17 00:00:00 2001 From: Jerome Lambourg Date: Mon, 26 Oct 2015 13:14:49 +0000 Subject: [PATCH] sysdep.c (__gnat_get_task_options): Refine the workaround for the VX_USR_TASK_OPTION bug in VxWorks 7... 2015-10-26 Jerome Lambourg * sysdep.c (__gnat_get_task_options): Refine the workaround for the VX_USR_TASK_OPTION bug in VxWorks 7, as we cannot check the value of VX_DEALLOC_TCB in RTP mode, the macro value not being defined in the headers. * g-arrspl.ads: Fix typo. From-SVN: r229356 --- gcc/ada/ChangeLog | 8 ++++++++ gcc/ada/g-arrspl.ads | 6 +++--- gcc/ada/sysdep.c | 8 ++++++-- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 6b12af25005..49aab446b9f 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,11 @@ +2015-10-26 Jerome Lambourg + + * sysdep.c (__gnat_get_task_options): Refine the workaround for + the VX_USR_TASK_OPTION bug in VxWorks 7, as we cannot check the + value of VX_DEALLOC_TCB in RTP mode, the macro value not being + defined in the headers. + * g-arrspl.ads: Fix typo. + 2015-10-26 Jerome Lambourg * sysdep.c (__gnat_get_task_options): Workaround a VxWorks diff --git a/gcc/ada/g-arrspl.ads b/gcc/ada/g-arrspl.ads index fa7e6603c14..ce3158c5ef3 100644 --- a/gcc/ada/g-arrspl.ads +++ b/gcc/ada/g-arrspl.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2002-2013, Free Software Foundation, Inc. -- +-- Copyright (C) 2002-2015, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -43,7 +43,7 @@ generic -- The array which is a sequence of element type Element_Set is private; - -- This type represent a set of elements. This set does not defined a + -- This type represent a set of elements. This set does not define a -- specific order of the elements. The conversion of a sequence to a -- set and membership tests in the set is performed using the routines -- To_Set and Is_In defined below. @@ -74,7 +74,7 @@ package GNAT.Array_Split is type Slice_Set is private; -- This type uses by-reference semantics. This is a set of slices as -- returned by Create or Set routines below. The abstraction represents - -- a set of items. Each item is a part of the original string named a + -- a set of items. Each item is a part of the original array named a -- Slice. It is possible to access individual slices by using the Slice -- routine below. The first slice in the Set is at the position/index -- 1. The total number of slices in the set is returned by Slice_Count. diff --git a/gcc/ada/sysdep.c b/gcc/ada/sysdep.c index 21cd37cc540..1ecbd1462bc 100644 --- a/gcc/ada/sysdep.c +++ b/gcc/ada/sysdep.c @@ -871,9 +871,13 @@ __gnat_get_task_options (void) - VX_PRIVATE_UMASK as a user-definable option This leads to VX_USR_TASK_OPTIONS allowing 0x8000 as VX_PRIVATE_UMASK but taskCreate refusing this option (VX_DEALLOC_TCB is not allowed) + + Note that the same error occurs in both RTP and Kernel mode, but + VX_DEALLOC_TCB is not defined in the RTP headers, so we need to + explicitely check if VX_PRIVATE_UMASK has value 0x8000 */ -# if defined (VX_PRIVATE_UMASK) && (VX_DEALLOC_TCB == VX_PRIVATE_UMASK) - options &= ~VX_DEALLOC_TCB; +# if defined (VX_PRIVATE_UMASK) && (0x8000 == VX_PRIVATE_UMASK) + options &= ~VX_PRIVATE_UMASK; # endif options &= VX_USR_TASK_OPTIONS; #endif -- 2.30.2