From 84deca68acbb6725d98b1a18f9631cb0fea7a122 Mon Sep 17 00:00:00 2001 From: burnus Date: Fri, 6 May 2011 18:35:00 +0000 Subject: 2011-05-06 Tobias Burnus PR fortran/18918 * caf/libcaf.h: Cleanup headers. (_gfortran_caf_critical, _gfortran_caf_end_critical): Make stub. (caf_register_t): New enum. (_gfortran_caf_register, _gfortran_caf_deregister): New prototype. * caf/single.c (_gfortran_caf_critical, _gfortran_caf_end_critical): Remove. (_gfortran_caf_register, _gfortran_caf_deregister): New functions. * caf/mpi.c (_gfortran_caf_critical, _gfortran_caf_end_critical): Remove. (_gfortran_caf_register, _gfortran_caf_deregister): New functions. (caf_world_window): Remove global variable. (_gfortran_caf_init): Fix off-by-one error of this_image. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173505 138bc75d-0d04-0410-961f-82ee72b054a4 --- libgfortran/caf/single.c | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) (limited to 'libgfortran/caf/single.c') diff --git a/libgfortran/caf/single.c b/libgfortran/caf/single.c index 7ee37b3a99d..c5c66b4b955 100644 --- a/libgfortran/caf/single.c +++ b/libgfortran/caf/single.c @@ -26,16 +26,16 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "libcaf.h" #include /* For fputs and fprintf. */ -#include /* For exit. */ +#include /* For exit and malloc. */ /* Define GFC_CAF_CHECK to enable run-time checking. */ /* #define GFC_CAF_CHECK 1 */ - /* Single-image implementation of the CAF library. Note: For performance reasons -fcoarry=single should be used rather than this library. */ + void _gfortran_caf_init (int *argc __attribute__ ((unused)), char ***argv __attribute__ ((unused)), @@ -45,11 +45,30 @@ _gfortran_caf_init (int *argc __attribute__ ((unused)), *num_images = 1; } + void _gfortran_caf_finalize (void) { } + +void * +_gfortran_caf_register (ptrdiff_t size, + caf_register_t type __attribute__ ((unused)), + void **token) +{ + *token = NULL; + return malloc (size); +} + + +int +_gfortran_caf_deregister (void **token __attribute__ ((unused))) +{ + return 0; +} + + int _gfortran_caf_sync_all (char *errmsg __attribute__ ((unused)), int errmsg_len __attribute__ ((unused))) @@ -78,15 +97,6 @@ _gfortran_caf_sync_images (int count __attribute__ ((unused)), return 0; } -void -_gfortran_caf_critical (void) -{ -} - -void -_gfortran_caf_end_critical (void) -{ -} void _gfortran_caf_error_stop_str (const char *string, int32_t len) @@ -99,6 +109,7 @@ _gfortran_caf_error_stop_str (const char *string, int32_t len) exit (1); } + void _gfortran_caf_error_stop (int32_t error) { -- cgit v1.2.1