Commit 2532f0f5 by Thomas Koenig

gfortran.texi: Mention that asynchronous I/O does not work on systems which lack condition...

2018-08-22  Thomas Koenig  <tkoenig@gcc.gnu.org>

	* gfortran.texi: Mention that asynchronous I/O does
	not work on systems which lack condition variables, such
	as AIX.

2018-08-22  Thomas Koenig  <tkoenig@gcc.gnu.org>

	* async.h: Set ASYNC_IO to zero if _AIX is defined.
	(struct adv_cond): If ASYNC_IO is zero, the struct has no members.
	(async_unit): If ASYNC_IO is zero, remove unneeded members.

From-SVN: r263788
parent bcddf743
2018-08-22 Thomas Koenig <tkoenig@gcc.gnu.org>
* gfortran.texi: Mention that asynchronous I/O does
not work on systems which lack condition variables, such
as AIX.
2018-08-22 Janus Weil <janus@gcc.gnu.org> 2018-08-22 Janus Weil <janus@gcc.gnu.org>
PR fortran/86935 PR fortran/86935
......
...@@ -1509,7 +1509,8 @@ end program main ...@@ -1509,7 +1509,8 @@ end program main
Asynchronous I/O is supported if the program is linked against the Asynchronous I/O is supported if the program is linked against the
POSIX thread library. If that is not the case, all I/O is performed POSIX thread library. If that is not the case, all I/O is performed
as synchronous. as synchronous. On systems which do not support pthread condition
variables, such as AIX, I/O is also performed as synchronous.
On some systems, such as Darwin or Solaris, the POSIX thread library On some systems, such as Darwin or Solaris, the POSIX thread library
is always linked in, so asynchronous I/O is always performed. On other is always linked in, so asynchronous I/O is always performed. On other
......
2018-08-22 Thomas Koenig <tkoenig@gcc.gnu.org>
* async.h: Set ASYNC_IO to zero if _AIX is defined.
(struct adv_cond): If ASYNC_IO is zero, the struct has no members.
(async_unit): If ASYNC_IO is zero, remove unneeded members.
2018-08-21 Nicolas Koenig <koenigni@gcc.gnu.org> 2018-08-21 Nicolas Koenig <koenigni@gcc.gnu.org>
Thomas Koenig <tkoenig@gcc.gnu.org> Thomas Koenig <tkoenig@gcc.gnu.org>
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
__gthread_cond_t and __gthread_equal / __gthread_self. Check __gthread_cond_t and __gthread_equal / __gthread_self. Check
this. */ this. */
#if defined(__GTHREAD_HAS_COND) && defined(__GTHREADS_CXX0X) #if defined(__GTHREAD_HAS_COND) && defined(__GTHREADS_CXX0X) && !defined(_AIX)
#define ASYNC_IO 1 #define ASYNC_IO 1
#else #else
#define ASYNC_IO 0 #define ASYNC_IO 0
...@@ -328,21 +328,18 @@ typedef union transfer_args ...@@ -328,21 +328,18 @@ typedef union transfer_args
struct adv_cond struct adv_cond
{ {
#if ASYNC_IO
int pending; int pending;
__gthread_mutex_t lock; __gthread_mutex_t lock;
__gthread_cond_t signal; __gthread_cond_t signal;
#endif
}; };
typedef struct async_unit typedef struct async_unit
{ {
pthread_mutex_t lock; /* Lock for manipulating the queue structure. */
pthread_mutex_t io_lock; /* Lock for doing actual I/O. */ pthread_mutex_t io_lock; /* Lock for doing actual I/O. */
struct adv_cond work; pthread_mutex_t lock; /* Lock for manipulating the queue structure. */
struct adv_cond emptysignal; bool empty;
struct st_parameter_dt *pdt;
pthread_t thread;
struct transfer_queue *head;
struct transfer_queue *tail;
struct struct
{ {
int waiting; int waiting;
...@@ -351,7 +348,13 @@ typedef struct async_unit ...@@ -351,7 +348,13 @@ typedef struct async_unit
struct adv_cond done; struct adv_cond done;
} id; } id;
bool empty; #if ASYNC_IO
struct adv_cond work;
struct adv_cond emptysignal;
struct st_parameter_dt *pdt;
pthread_t thread;
struct transfer_queue *head;
struct transfer_queue *tail;
struct { struct {
const char *message; const char *message;
...@@ -361,7 +364,7 @@ typedef struct async_unit ...@@ -361,7 +364,7 @@ typedef struct async_unit
int family; int family;
bool fatal_error; bool fatal_error;
} error; } error;
#endif
} async_unit; } async_unit;
void init_async_unit (gfc_unit *); void init_async_unit (gfc_unit *);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment