Skip site navigation (1) Skip section navigation (2)

Re: Stuck Spinlock (fwd) - m68k architecture, 7.0.3

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Oliver Elphick" <olly(at)lfix(dot)co(dot)uk>
Cc: pgsql-hackers(at)postgresql(dot)org, pgsql-ports(at)postgresql(dot)org, Russell Hires <rhires(at)earthlink(dot)net>
Subject: Re: Stuck Spinlock (fwd) - m68k architecture, 7.0.3
Date: 2001-02-05 15:26:36
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-ports
"Oliver Elphick" <olly(at)lfix(dot)co(dot)uk> writes:
> Has anyone got PostgreSQL 7.0.3 working on m68k architecture?
> Russell is trying to install it on m68k and is consistently getting a
> stuck spinlock in initdb.   He used to have 6.3.2 working. Both 6.5.3
> and 7.0.3 fail.
> His message shows that the first attempt to set a lock fails.

There was no TAS() support for m68k before 6.5, so 6.3.2 could have
"worked" only for rather small values of "work".

Just eyeballing the m68k TAS assembly code, I think it is incorrectly
assuming that the result register will start off as zeroes.  Please try
the following patch in src/include/storage/s_lock.h:

  static __inline__ int
  tas(volatile slock_t *lock)
      register int rv;
      __asm__    __volatile__(
+         "    clrl   %0        \n"
          "    tas    %1        \n"
          "    sne    %0        \n"
  :        "=d"(rv), "=m"(*lock)
  :        "1"(*lock)
  :        "cc");
      return rv;

(This is against the current CVS file; the code is formatted differently
in 6.5, but is equivalent.)

Don't forget to "make clean" and rebuild the whole backend after
applying the patch, unless you've set up proper dependency tracking.

			regards, tom lane

In response to

pgsql-ports by date

Next:From: Bruce MomjianDate: 2001-02-05 17:39:05
Subject: Re: IpcMemoryDetach fails under Cygwin on Win98
Previous:From: Oliver ElphickDate: 2001-02-05 14:29:33
Subject: Stuck Spinlock (fwd) - m68k architecture, 7.0.3

pgsql-hackers by date

Next:From: Mathieu DubeDate: 2001-02-05 15:41:41
Subject: 1024 limits??
Previous:From: Culley HarrelsonDate: 2001-02-05 15:22:49
Subject: full text searching

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group