All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sasha Khapyorsky <sashak-smomgflXvOZWk0Htik3J/w@public.gmane.org>
To: Yevgeny Kliteynik
	<kliteyn-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
Cc: Linux RDMA <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] opensm: event plig-in API fixed to compile with g++
Date: Mon, 5 Jul 2010 21:11:43 +0300	[thread overview]
Message-ID: <20100705181143.GG22860@me> (raw)
In-Reply-To: <4C2312F0.8020308-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>

On 11:10 Thu 24 Jun     , Yevgeny Kliteynik wrote:
> Event API should have been able to be used by libraries
> written both in C and C++.

I don't know about such requirement. Personally I would strongly suggest
to not mix things without really good reason - we discussed already about
"extern "C"" removal in a future.

> The problem is, one of the
> fields in struct osm_event_plugin is called "delete".
> Changing it to "destroy" and promoting the API version.

This will break any existing plugin now (I know at least couple). I
don't think that such change is appropriate for "between RCs" period.

Sasha

> Signed-off-by: Yevgeny Kliteynik <kliteyn-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
> ---
>  opensm/include/opensm/osm_event_plugin.h    |    2 +-
>  opensm/opensm/osm_event_plugin.c            |    4 ++--
>  opensm/osmeventplugin/libosmeventplugin.ver |    2 +-
>  opensm/osmeventplugin/src/osmeventplugin.c  |    2 +-
>  4 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/opensm/include/opensm/osm_event_plugin.h b/opensm/include/opensm/osm_event_plugin.h
> index 0b3464e..aa3fed4 100644
> --- a/opensm/include/opensm/osm_event_plugin.h
> +++ b/opensm/include/opensm/osm_event_plugin.h
> @@ -145,7 +145,7 @@ typedef struct osm_api_ps_event {
>  typedef struct osm_event_plugin {
>  	const char *osm_version;
>  	void *(*create) (struct osm_opensm *osm);
> -	void (*delete) (void *plugin_data);
> +	void (*destroy) (void *plugin_data);
>  	void (*report) (void *plugin_data, osm_epi_event_id_t event_id,
>  			void *event_data);
>  } osm_event_plugin_t;
> diff --git a/opensm/opensm/osm_event_plugin.c b/opensm/opensm/osm_event_plugin.c
> index 2d67065..7f61960 100644
> --- a/opensm/opensm/osm_event_plugin.c
> +++ b/opensm/opensm/osm_event_plugin.c
> @@ -141,8 +141,8 @@ DLOPENFAIL:
>  void osm_epi_destroy(osm_epi_plugin_t * plugin)
>  {
>  	if (plugin) {
> -		if (plugin->impl->delete)
> -			plugin->impl->delete(plugin->plugin_data);
> +		if (plugin->impl->destroy)
> +			plugin->impl->destroy(plugin->plugin_data);
>  		dlclose(plugin->handle);
>  		free(plugin->plugin_name);
>  		free(plugin);
> diff --git a/opensm/osmeventplugin/libosmeventplugin.ver b/opensm/osmeventplugin/libosmeventplugin.ver
> index f755ff6..0c3a85b 100644
> --- a/opensm/osmeventplugin/libosmeventplugin.ver
> +++ b/opensm/osmeventplugin/libosmeventplugin.ver
> @@ -6,4 +6,4 @@
>  # API_REV - advance on any added API
>  # RUNNING_REV - advance any change to the vendor files
>  # AGE - number of backward versions the API still supports
> -LIBVERSION=1:0:0
> +LIBVERSION=2:0:0
> diff --git a/opensm/osmeventplugin/src/osmeventplugin.c b/opensm/osmeventplugin/src/osmeventplugin.c
> index f40f7fe..a82be07 100644
> --- a/opensm/osmeventplugin/src/osmeventplugin.c
> +++ b/opensm/osmeventplugin/src/osmeventplugin.c
> @@ -207,6 +207,6 @@ static void report(void *_log, osm_epi_event_id_t event_id, void *event_data)
>  osm_event_plugin_t osm_event_plugin = {
>        osm_version:OSM_VERSION,
>        create:construct,
> -      delete:destroy,
> +      destroy:destroy,
>        report:report
>  };
> -- 
> 1.5.1.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2010-07-05 18:11 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-24  8:10 [PATCH] opensm: event plig-in API fixed to compile with g++ Yevgeny Kliteynik
     [not found] ` <4C2312F0.8020308-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2010-06-24 14:36   ` RDMA synchronous operations Andrea Gozzelino
     [not found]     ` <964270.1277390217198.SLOX.WebMail.wwwrun-XDIR3SKYeFbgKi2NxijLtw@public.gmane.org>
2010-06-24 19:21       ` Dotan Barak
2010-07-05 18:11   ` Sasha Khapyorsky [this message]
2010-07-05 18:30     ` [PATCH] opensm: event plig-in API fixed to compile with g++ Hal Rosenstock
     [not found]       ` <AANLkTilUABmkKA8W-vIVWyTuDR8Gte9jtxmDUL1SiAte-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-07-05 18:41         ` Sasha Khapyorsky
2010-07-05 18:49           ` Hal Rosenstock
     [not found]             ` <AANLkTina2lO8M65L465jXjO1ukaAudUO1ZNk8opfKtQc-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-07-05 22:52               ` Sasha Khapyorsky
2010-07-05 23:29                 ` Hal Rosenstock
     [not found]                   ` <AANLkTinWEuCtSSfVc1Ti0SjgmUl3vnEY-DDd1nkWtlne-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-07-06 16:21                     ` Hefty, Sean
     [not found]                       ` <CF9C39F99A89134C9CF9C4CCB68B8DDF25A116CA8F-osO9UTpF0USkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2010-07-06 17:00                         ` Roland Dreier
     [not found]                           ` <adamxu4mtov.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>
2010-07-07 13:58                             ` Sasha Khapyorsky
2010-07-08 13:22                               ` Hal Rosenstock
2010-07-06 21:03           ` Ira Weiny
     [not found]             ` <20100706140335.81e25f4c.weiny2-i2BcT+NCU+M@public.gmane.org>
2010-07-06 22:19               ` Yevgeny Kliteynik
2010-07-07 11:22     ` Yevgeny Kliteynik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100705181143.GG22860@me \
    --to=sashak-smomgflxvozwk0htik3j/w@public.gmane.org \
    --cc=kliteyn-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.