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] Add support for pragma Task_Info on gnu/linux


Tested on i686-linux, committed on trunk

This adds support for the pragma Task_Info on GNU/Linux.
The Task_Info pragma can be used to give OS dependent information
about the handling of specific tasks. In this case we add support
for telling the GNU/Linux scheduler that such thread has affinity
with some set of processors/cores.

2007-12-13  Pascal Obry  <obry@adacore.com>

	* adaint.c (__gnat_pthread_setaffinity_np): New routine. A dummy
	version is provided for older GNU/Linux distribution not
	supporting thread affinity sets.
	Also add partial support for RTX.

	* s-osinte-linux.ads (SC_NPROCESSORS_ONLN): New constant for sysconf
	call.
	(bit_field): New packed boolean type used by cpu_set_t.
	(cpu_set_t): New type corresponding to the C type with
	the same name. Note that on the Ada side we use a bit
	field array for the affinity mask. There is not need
	for the C macro for setting individual bit.
	(pthread_setaffinity_np): New imported routine.
	
	* s-taprop-linux.adb (Enter_Task): Check that the CPU affinity mask is
	no null.
	(Create_Task): Set the processor affinity mask if information
	is present.
	
	* s-tasinf-linux.ads, s-tasinf-linux.adb: New files.
	

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]