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] Synchronization of run time support for controlled objects


This patch reimplements the synchronization of the mechanism which handles the
allocation, deallocation and finalization of heap-allocated controlled objects.

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

2011-10-24  Hristian Kirtchev  <kirtchev@adacore.com>

	* s-finmas.adb (Attach): Synchronize and call the unprotected version.
	(Attach_Unprotected): New routine.
	(Delete_Finalize_Address): Removed.
	(Delete_Finalize_Address_Unprotected): New routine.
	(Detach): Synchronize and call the unprotected version.
	(Detach_Unprotected): Remove locking.
	(Finalize): Add various comment on synchronization. Lock the critical
	region and call the unprotected versions of routines.
	(Finalize_Address): Removed.
	(Finalize_Address_Unprotected): New routine.
	(Set_Finalize_Address): Synchronize and call
	the unprotected version.
	(Set_Finalize_Address_Unprotected): New routine.
	(Set_Heterogeneous_Finalize_Address): Removed.
	(Set_Heterogeneous_Finalize_Address_Unprotected): New routine.
	(Set_Is_Heterogeneous): Add comment on synchronization and
	locking.
	* s-finmas.ads: Flag Finalization_Started is no longer atomic
	because synchronization uses task locking / unlocking.
	(Attach): Add comment on usage.
	(Attach_Unprotected): New routine.
	(Delete_Finalize_Address): Renamed to
	Delete_Finalize_Address_Unprotected.
	(Detach): Add comment on usage.
	(Detach_Unprotected): New routine.
	(Finalize_Address): Renamed to Finalize_Address_Unprotected.
	(Set_Finalize_Address): Add comment on usage.
	(Set_Finalize_Address_Unprotected): New routine.
	(Set_Heterogeneous_Finalize_Address): Renamed to
	Set_Heterogeneous_Finalize_Address_Unprotected.
	* s-stposu.adb (Allocate_Any_Controlled): Add local variable
	Allocation_Locked. Add various comments on synchronization. Lock
	the critical region and call the unprotected version of
	routines.
	(Deallocate_Any_Controlled): Add various comments on
	synchronization. Lock the critical region and call the unprotected
	version of routines.

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]