From: | Tom Ivar Helbekkmo <tih(at)Hamartun(dot)Priv(dot)NO> |
---|---|
To: | dg(at)illustra(dot)com (David Gould) |
Cc: | maillist(at)candle(dot)pha(dot)pa(dot)us, scrappy(at)hub(dot)org, dz(at)cs(dot)unitn(dot)it, pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] Re: [PATCHES] patches for 6.2.1p6 |
Date: | 1998-04-02 04:52:33 |
Message-ID: | 86iuosbzam.fsf@barsoom.Hamartun.Priv.NO |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
* David Gould
|
| What do you mean "now with the return values from tas() swapped"? I think
| your code looks ok, but just want to be sure we are following the same
| grand plan...
I just meant that my original code (which has been posted before) had
the tas() function implemented so that it returned 0 on failure, not
on success, as you asked for. Thus, I had to swap the sense of the
return value. In practice, I changed
clrl r0 ; clear register r0
bbssi $0,(%1),1f ; branch on bit set else set
incl r0 ; increment register r0
1: movl r0,%0 ; return register r0
[...]
#define S_LOCK(addr) do { while (!tas(addr)) ; } while (0)
...into...
movl $1, r0 ; set register r0 to 1
bbssi $0,(%1),1f ; branch on bit set else set
clrl r0 ; clear register r0
1: movl r0,%0 ; return register r0
[...]
#define S_LOCK(addr) do { while (tas(addr)) ; } while (0)
-tih
--
Popularity is the hallmark of mediocrity. --Niles Crane, "Frasier"
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas G. Lockhart | 1998-04-02 05:14:16 | Re: [HACKERS] Open 6.3.1 issues |
Previous Message | Thomas G. Lockhart | 1998-04-02 04:43:57 | Re: [HACKERS] Open 6.3.1 issues |