Re: [HACKERS] Re: [PATCHES] patches for 6.2.1p6
| От | Tom Ivar Helbekkmo |
|---|---|
| Тема | Re: [HACKERS] Re: [PATCHES] patches for 6.2.1p6 |
| Дата | |
| Msg-id | 86iuosbzam.fsf@barsoom.Hamartun.Priv.NO обсуждение |
| Ответ на | Re: [HACKERS] Re: [PATCHES] patches for 6.2.1p6 (dg@illustra.com (David Gould)) |
| Ответы |
Re: [HACKERS] Re: [PATCHES] patches for 6.2.1p6
|
| Список | 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"
В списке pgsql-hackers по дате отправления: