X-Spam-Check-By: sourceware.org
Message-ID: <44A5DFC3.E9FF7B58@dessent.net>
Date: Fri, 30 Jun 2006 19:36:51 -0700
From: Brian Dessent <brian@dessent.net>
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: rsync over ssh hang issue understood
References: <44A348D1.6070908@netbauds.net> <ba40711f0606291839p2e1d7b10l7befd8cf2cc2d1a7@mail.gmail.com> <44A507F8.4030409@netbauds.net> <44A53F4B.4070503@netbauds.net> <e83hnt$lve$1@sea.gmane.org> <44A57EC6.2060805@netbauds.net> <e845jo$4s6$1@sea.gmane.org>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Reply-To: cygwin@cygwin.com
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

mwoehlke wrote:

> Um... probably? Did you try looking at them? There is an
> InterlockedExchangeAdd (I think that's the right name... anyway, you
> feed it a pointer and a constant, and you get back the previous value).
> At any rate, anything Linux can do in assembly, Windows can also do,
> also in assembly, with it's own __asm keyword. The syntax is a little
> different, but it's there, and for something as speed-sensitive as I
> would guess pipes are, this sort of optimization is probably a Good Thing.

Maybe you guys ought to read the existing source code before discussing
this.  There are already dozens of calls to InterlockedIncrement,
InterlockedDecrement, InterlockedExchange, and
InterlockedCompareExchange in the codebase, and if you look at winbase.h
you'll see that these have been #defined to be inline assembly versions
of the functions.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

