Return-Path: owner-postman
Received: from localhost.Berkeley.EDU (localhost.Berkeley.EDU [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.9/8.6.3) with SMTP id DAA24417 for postgres-redist; Tue, 1 Nov 1994 03:19:17 -0800
Resent-From: POSTGRES mailing list <postman@postgres.Berkeley.EDU>
Resent-Message-Id: <199411011119.DAA24417@nobozo.CS.Berkeley.EDU>
X-Authentication-Warning: nobozo.CS.Berkeley.EDU: Host localhost.Berkeley.EDU didn't use HELO protocol
Sender: owner-postman@postgres.Berkeley.EDU
X-Return-Path: owner-postman
Received: from ixgate02.dfnrelay.d400.de (ixgate02.dfnrelay.d400.de [193.174.248.2]) by nobozo.CS.Berkeley.EDU (8.6.9/8.6.3) with ESMTP id DAA24407 for <postgres@nobozo.CS.Berkeley.edu>; Tue, 1 Nov 1994 03:19:15 -0800
X400-Received: by mta d400relay in /PRMD=dfnrelay/ADMD=d400/C=de/; Relayed;
               Tue, 1 Nov 1994 12:20:11 +0100
X400-Received: by /PRMD=TU-Berlin/ADMD=D400/C=DE/; Relayed;
               Tue, 1 Nov 1994 12:16:53 +0100
X400-Received: by /PRMD=TU-Berlin/ADMD=D400/C=DE/; Relayed;
               Mon, 31 Oct 1994 08:16:14 +0100
X400-Received: by /PRMD=TU-Berlin/ADMD=D400/C=DE/; Relayed;
               Mon, 31 Oct 1994 08:16:11 +0100
X400-Received: by /PRMD=TU-Berlin/ADMD=D400/C=DE/; Relayed;
               Tue, 1 Nov 1994 11:58:57 +0100
Date: Tue, 1 Nov 1994 11:58:57 +0100
X400-Originator: wpp@marie.physik.tu-berlin.d400.de
X400-Recipients: non-disclosure:;
X400-MTS-Identifier: [/PRMD=TU-Berlin/ADMD=D400/C=DE/;<9411011116.AA16487@lise.physik.]
X400-Content-Type: P2-1984 (2)
Content-Identifier: Re: problems ...
Alternate-Recipient: Allowed
From: " (Kai Petzke)" <wpp@marie.physik.tu-berlin.d400.de>
Message-ID: <9411011116.AA16487@lise.physik.tu-berlin.de>
To: bachesta@angst.tera.com
Cc: postgres@postgres.Berkeley.EDU
In-Reply-To: <9411010530.AA24046@angst.tera.com>
Subject: Re: problems building src/backend/storage/ipc/s_lock.c
X-Mailer: ELM [version 2.4 PL23]
Content-Type: text
Content-Length: 902
Resent-To: postgres-redist@postgres.Berkeley.EDU
Resent-Date: Tue, 01 Nov 94 03:19:17 -0800
Resent-XMts: smtp

> 
> 
> 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.
==============================================================================
