Re: http://www.postgresql.org/doxlist.html (fwd)

From: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
To: tgl(at)sss(dot)pgh(dot)pa(dot)us
Cc: elo(at)is2inc(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: http://www.postgresql.org/doxlist.html (fwd)
Date: 2000-05-06 07:36:35
Message-ID: 20000506163635N.t-ishii@sra.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> BTW, hackers: does anyone understand just how the spinlock support
> works on PPC, SPARC, etc? For example, I see that include/port/linux.h
> defines HAS_TEST_AND_SET for __powerpc__ or __sparc__, but that should
> mean that there's a machine-specific tas() subroutine somewhere. All
> I can find is code in backend/storage/buffer/s_lock.c that looks like
> the right thing, but it's called tas_dummy() not tas()! How does
> control get to it?

I'm not sure about sparc but... in the following asm code, there is a
symbol "tas" that is visibile to linker. I rember that tas() codes on
some platforms used to do similar thing as sparc and power pc. Now
they have been rewritten so that they use the inlining. The reason why
power pc still remains as it is is just I don't know how to write
power pc asm code suitable for inlining :-)

static void
tas_dummy()
{
__asm__(" \n\
.global tas \n\
tas: \n\
lwarx 5,0,3 \n\
cmpwi 5,0 \n\
bne fail \n\
[snip]
--
Tatsuo Ishii

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2000-05-06 08:53:00 Re: CREATE DATABASE WITH OWNER '??';
Previous Message Sverre H. Huseby 2000-05-06 07:09:33 Re: You're on SecurityFocus.com for the cleartext passwords.