agora inbox for postgres@postgres.berkeley.edu  
help / color / mirror / Atom feed
From:  (Kai Petzke) <wpp@marie.physik.tu-berlin.d400.de>
To: bachesta@angst.tera.com
Cc: postgres@postgres.Berkeley.EDU
Subject: Re: problems building src/backend/storage/ipc/s_lock.c
Date: Tue, 1 Nov 1994 11:58:57 +0100
Message-ID: <9411011116.AA16487@lise.physik.tu-berlin.de> (raw)
In-Reply-To: <9411010530.AA24046@angst.tera.com>

> 
> 
> I'm busy porting postgres 4.2 to NetBSD 1.0 and I came across  the
> following error:

[...]

> #if defined(__i386__) && defined(__GNUC__)
>  
> tas(lock)
>     slock_t *lock;
> {
>     slock_t res;
>     __asm__("xchgb %0,%1":"=q" (res),"=m" (*m):"0" (0x1));
>     return(res);
> }
>  
> line 283 is the __asm__ line. My questin is where is "m" supposed to
> be defined and why does this compile for other OS's (i.e. linux freebsd),
> or does it. I'm not an assembly guru so any help you can give me is
> appreciated.

No, the (*m) is wrong.  It should be (*lock).

You have started your port from the core distribution of Postgres,
which has only part of the linux or FreeBSD specific changes in
it (eg. those, that Paul Aoki came around to include).

I recommend you to get the FreeBSD (or linux) patches, and apply
them, before you continue.  It will save you lots of doubled work.




Kai


==============================================================================
   To add/remove yourself to/from the POSTGRES mailing list: send mail with 
   the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU"

   If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and
   a human will deal with it.  DO NOT post to the "postgres" mailing list.
==============================================================================



reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: postgres@postgres.berkeley.edu
  Cc: wpp@marie.physik.tu-berlin.d400.de, bachesta@angst.tera.com
  Subject: Re: problems building src/backend/storage/ipc/s_lock.c
  In-Reply-To: <9411011116.AA16487@lise.physik.tu-berlin.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox