agora inbox for postgres@postgres.berkeley.edu
help / color / mirror / Atom feedFrom: Kai Petzke <wpp@marie.physik.tu-berlin.de>
To: Michael Graff <explorer@vorpal.com>
Cc: postgres@postgres.Berkeley.EDU
Subject: Re: tas.s
Date: Thu, 8 Dec 1994 13:06:44 +0100 (MET)
Message-ID: <9412081223.AA00043@marie.physik.tu-berlin.de> (raw)
In-Reply-To: <199412060751.BAA04308@packrat.vorpal.com>
>
>
> I'm working on a quick port to NetBSD/i386-current and need to
> have an example i386 tas.s.
There is no such thing as a quick port of Postgres.
> Could someone mail this to me if
> possible, or tell me where to find it (other than downloading lots
> of megs over a 14.4k line. ;)
The following works fine under Linux. Insert into the file:
~postgres/src/backend/storage/ipc
slock_t should be defined as char.
Kai
------------- snip here ---------------
#if defined(__i386__) && defined(__GNUC__)
static inline tas(lock)
slock_t *lock;
{
slock_t res;
__asm__("xchgb %0,%1":"=q" (res),"=m" (*lock):"0" (0x1));
return(res);
}
S_LOCK(lock)
slock_t *lock;
{
while (tas(lock))
;
}
S_UNLOCK(lock)
slock_t *lock;
{
*lock = 0;
}
S_INIT_LOCK(lock)
slock_t *lock;
{
S_UNLOCK(lock);
}
#endif /* __i386__ && __GNUC__ */
#endif /* HAS_TEST_AND_SET */
==============================================================================
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.
==============================================================================
URL: http://s2k-ftp.CS.Berkeley.EDU:8000/postgres/
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.de, explorer@vorpal.com
Subject: Re: tas.s
In-Reply-To: <9412081223.AA00043@marie.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