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]

Re: [libgomp] Add Unix95 mutex support


On Feb 15, 2006, at 3:45 PM, Eric Botcazou wrote:
	* configure.tgt: Pass -DLIBGOMP_UNIX95 to the compiler
	and -lposix4 to the linker on Solaris 2.5.1 and 2.6.


I thought configure.tgt was precisely aimed at getting rid of the configure mess?

I think that configure should be preferred if there might exist other systems that might need the same logic. If such a choice would be an oddity, putting this in configure.tgt is fine.


	(omp_init_nest_lock): Add Unix95 support.
	(omp_set_nest_lock): Likewise.
	(omp_unset_nest_lock): Likewise.
	(omp_test_nest_lock): Likewise.

#ifdef like this isn't preferred. Instead, put in one large block:


#ifdef

omp_unset_nest_lock() { }
omp_test_nest_lock() { }

#else

omp_unset_nest_lock() { }
omp_test_nest_lock() { }

#endif

or even better, split them into two files lock.c and lock95.c, though, I do agree with Andrew's comment about using thr-* if appropriate.


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