public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dipankar Sarma <dipankar@in.ibm.com>
To: brad@linuxcanada.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: Multi-threading
Date: Tue, 12 Mar 2002 01:06:18 +0530	[thread overview]
Message-ID: <20020312010618.A32259@in.ibm.com> (raw)


In article <20020311182111Z310364-889+120750@vger.kernel.org> Brad Pepers wrote:
> There was a message posted by Jim Starkey about his experiences using threads 
> on Linux and the problems debugging them.  It came down to two things:

> 2. Linux is missing an atomic use-count mechanism which returns values like
>    the Microsoft InterlockedIncrement/Decrement functions do.

Can't this be done using atomic_dec_and_test() and the likes ?
Google tells me that windoze InterlockedIncrement/Decrement stuff
does the almost same thing. Why can't refcounting be
implemented using just atomic_inc/dec and/or atomic_inc/dec_and_test ?

Thanks
-- 
Dipankar Sarma  <dipankar@in.ibm.com> http://lse.sourceforge.net
Linux Technology Center, IBM Software Lab, Bangalore, India.

             reply	other threads:[~2002-03-11 19:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-11 19:36 Dipankar Sarma [this message]
2002-03-11 23:53 ` Multi-threading Brad Pepers
     [not found] <20020311182111Z310364-889+120750@vger.kernel.org.suse.lists.linux.kernel>
2002-03-11 21:54 ` Multi-threading Andi Kleen
2002-03-12  0:02   ` Multi-threading Brad Pepers
     [not found]   ` <20020312000310.DBCF41EDB9@Cantor.suse.de>
2002-03-12  7:10     ` Multi-threading Andi Kleen
2002-03-13  7:51       ` Multi-threading David Schwartz
2002-03-13  8:23         ` Multi-threading Andi Kleen
2002-03-13  9:01           ` Multi-threading David Schwartz
2002-03-14  4:50           ` Multi-threading Rusty Russell
  -- strict thread matches above, loose matches on Subject: below --
2002-03-11 18:20 Multi-threading Brad Pepers

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=20020312010618.A32259@in.ibm.com \
    --to=dipankar@in.ibm.com \
    --cc=brad@linuxcanada.com \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox