At 16:30 23.05.01 -0400, Tom Lane wrote:
>"Leandro Medina" <lmedina@ingdesi.com> writes:
> > I'm porting posgresql for QNX RTP. Compiling is ok, but
> > "/usr/local/pqsql/bin/initdb -D data" command say:
>
> > FATAL: s_lock(0x081e6029) at spin.c:162, stuck spinlock. Aborting.
>
>Hm. The existing QNX spinlock functions do work for some people.
>Is the slock_t datatype declared correctly for your platform in the
>port header file?
Just to throw in my $0.02 :
- from the source snippet it looks like it is using semaphores for
spinlocks. This is one of the quirks that my patch corrected. See
http://www.ca.postgresql.org/mhonarc/pgsql-ports/2001-05/msg00069.html
and
http://www.ca.postgresql.org/mhonarc/pgsql-ports/2001-05/msg00078.html
Without it 7.1 failed with a similar problem on QNX4.
- RTP is probably more different from QNX4 than Solaris 2 from SunOS 4,
so code that works on QNX4 may fail on RTP. It is much closer to
modern unices and supports shared libraries, elf executables, etc. .
AFAIK no SysV IPC interface, though. The RTP version could be much
more fully featured that the QNX4 version.
- QNX (both versions) is a RTOS. If you were to use RR or FIFO
scheduling, spinlocks probably won't work.
> regards, tom lane