On Fri, Jan 27, 2017 at 10:19:18AM +0100, Thomas Schwinge wrote:
> During development, I had been changing the libgomp plugin API, which
> should have caused build failures in unmodified plugins -- but it didn't.
> Here is patch to address that.  OK for trunk?  Should this also go into
> release branches?
> 
> commit 01828b7ec25f2087548b5c75568b545aa0d16c3b
> Author: Thomas Schwinge <tho...@codesourcery.com>
> Date:   Thu Jan 26 21:03:57 2017 +0100
> 
>     libgomp: Provide prototypes for functions implemented by libgomp plugins
>     
>             libgomp/
>             * libgomp-plugin.h: #include <stdbool.h>.

For the prototypes, just use
        (GOMP_OFFLOAD_get_name, GOMP_OFFLOAD_get_caps,
        ....
        GOMP_OFFLOAD_openacc_set_stream): New prototype.

> --- libgomp/libgomp.h
> +++ libgomp/libgomp.h
> @@ -882,31 +882,30 @@ typedef struct acc_dispatch_t
>    struct target_mem_desc *data_environ;
>  
>    /* Execute.  */
> -  void (*exec_func) (void (*) (void *), size_t, void **, void **, int,
> -                  unsigned *, void *);
> +  typeof (GOMP_OFFLOAD_openacc_exec) *exec_func;

Please use __typeof instead of typeof, that is the keyword spelling rest of
libgomp uses.
>  
>    /* Async cleanup callback registration.  */
> -  void (*register_async_cleanup_func) (void *, int);
> +  typeof (GOMP_OFFLOAD_openacc_register_async_cleanup) 
> *register_async_cleanup_func;

Many lines are too long, plus adding 2 __s might make some just below limit
lines over it.  Please use
  __typeof (GOMP_OFFLOAD_openacc_register_async_cleanup)
    *register_async_cleanup_func;
in that case.

Ok with those changes for trunk, please leave release branches as is.

        Jakub

Reply via email to