public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Khapyorsky <sashak@voltaire.com>
To: Sean Hefty <sean.hefty@intel.com>
Cc: linux-rdma@vger.kernel.org, ofw@lists.openfabrics.org
Subject: Re: [PATCH 1/2] contain pthreads defs with ifdef HAVE_LIBPTHREAD
Date: Fri, 6 Nov 2009 18:58:34 +0200	[thread overview]
Message-ID: <20091106165834.GE7192@me> (raw)
In-Reply-To: <74DB7ADB8B154DE69B8F65456193D483@amr.corp.intel.com>

On 13:05 Wed 04 Nov     , Sean Hefty wrote:
> >Contain pthread definitions with ifdef HAVE_LIBPTHREAD
> >
> >Signed-off-by: stan smith <stan.smith@intel.com>
> >
> >diff --git a/opensm/include/vendor/osm_vendor_ibumad.h
> >b/opensm/include/vendor/osm_vendor_ibumad.h
> >index 0a4692d..d523412 100644
> >--- a/opensm/include/vendor/osm_vendor_ibumad.h
> >+++ b/opensm/include/vendor/osm_vendor_ibumad.h
> >@@ -160,8 +160,13 @@ typedef struct _osm_vendor {
> > 	char ca_names[OSM_UMAD_MAX_CAS][UMAD_CA_NAME_LEN];
> > 	vendor_match_tbl_t mtbl;
> > 	umad_port_t umad_port;
> >+#ifdef HAVE_LIBPTHREAD
> > 	pthread_mutex_t cb_mutex;
> > 	pthread_mutex_t match_tbl_mutex;
> >+#else
> >+	cl_mutex_t cb_mutex;
> >+	cl_mutex_t match_tbl_mutex;
> >+#endif
> 
> complib is available on both platforms, why not just use it?

We don't have cl_mutex_t in linux's implementation.

I didn't know that complib on windows already implements semantics which
are similar to most useful pthread things. That is good, and seems that
an easy porting could be done by using macros like:

#define pthread_* cl_thread_*

Sasha

  parent reply	other threads:[~2009-11-06 16:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-04 20:58 [PATCH 1/2] contain pthreads defs with ifdef HAVE_LIBPTHREAD Stan C. Smith
2009-11-04 21:05 ` Sean Hefty
2009-11-04 21:06   ` Sean Hefty
     [not found]   ` <74DB7ADB8B154DE69B8F65456193D483-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
2009-11-04 22:42     ` Smith, Stan
2009-11-06 16:58   ` Sasha Khapyorsky [this message]
     [not found] ` <F9EFFFF3BD1D442AB6AA993FD6F0B5D8-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
2009-11-05 17:07   ` Smith, Stan
     [not found]     ` <3F6F638B8D880340AB536D29CD4C1E1912C8E0D221-osO9UTpF0USkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2009-11-06 16:56       ` Sasha Khapyorsky
2009-11-06 17:07         ` Smith, Stan

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=20091106165834.GE7192@me \
    --to=sashak@voltaire.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=ofw@lists.openfabrics.org \
    --cc=sean.hefty@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox