This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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: [Patch, Fortran] -fcoarray=single implementation of the atomic subroutines


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

On 05/31/11 18:24, Tobias Burnus wrote:
> This patch adds the atomic_define and atomic_ref intrinsics. They are
> currently implemented in form a simple assignment. For -fcoarray=lib
> they will be replaced by a function call to libcaf_{single,mpi,*}.
> 
> I was shortly thinking of using something more clever, but I concluded
> that a simple assignment should be sufficiently atomic (for
> -fcoarray=single).
> 
> Build and regtested on x86-64-linux.
> OK for the trunk?

Ok.  Just one thought:

+  if (!(atom->ts.type == BT_INTEGER && atom->ts.kind == gfc_c_int_kind)
+      && !(atom->ts.type == BT_LOGICAL && atom->ts.kind == gfc_c_int_kind))

What about defining another constant for atomic_int_kind rather than
gfc_c_int_kind, in case we want to change this in the future?  Or is it
clear that we indeed *always* want atomic_int_kind to be c_int_kind?

Yours,
Daniel
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIVAwUBTeUZOlJ+ebqjtTmYAQLJyw//YT4NNnyxw5xv0e5ytBe5ec2NSInQt1w8
iTrKxHVhtTI7mJGVPae0wYLhLMm95pZ2I6Mp0ExFDT2Mnugw9QdGG1z2U4Hdbns3
qFdMhc2ub5ZtqlpLevojqJOM+Cz8b7nUJtczc8qY9tNC8r1ybQBOFfJEfPeBytVA
BzysrOSx7rkuSQScRrr8S5e1NY1e4Mf2nLDvLlgdWpzSgBmm9At3CvZPASnskIxB
DNMcCwWKuoRHTLOLMZEgrBp65vr1tNf7IHe0Z0Kmi7UgEvsrs7NwDvvRczBoLa2v
cueVRU4ZMU+qNhNqM2QL1pYED0QEMrcHzshq2xt7r3p1XCKNhQeJlNg/Cpucs8a3
e+E9uAtNDJLVwCE/v71Vy8zXt5kr+fNDr/N2vEM0iJaqfzeUz5PI7uxy5wvoI5Oq
ktuHxM9b7Ev8DtFJym5opLzYBTLA36F+H8zFtMfBwGnmuaNRGPqUUU7j/XBIAb3E
DjRXq7FbRwIObPz06SQ4F3peG8abegs8+guqNw4V4ZKeWDU4fZhRsutLCnSi/jj1
94n1hWp1sf4gwWk3aK/90JXuQxAnnOz4VIskymuFwr8ZlnnX5+S62t8sYLRRL/BC
FyJofN/uDyZ/0cbrVggAJtXHK29EGli/lPX7PYPiGpDkEvAB0auWjNI+EvPZS/gc
Nr7b+g16vUI=
=fYF2
-----END PGP SIGNATURE-----


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