Re: svgalib, pthreads question

Search this archive.

From: Matan Ziv-Av (matan@svgalib.org)
Date: Fri 12 Apr 2002 - 12:49:45 IDT


On Thu, 11 Apr 2002, Madan Mohan Jampani wrote:

> Hi all,

> I have a serious problem with my svgalib application that also uses
> pthreads.
>   The problem is that SOMETIMES the system hangs on making a
> pthread_create() call. Even though the create call returns success
> control is never transferred to that thread. When this happenes that
> system is dead and I need to do a hard reboot.
>  I came to know from the pthreads manual that both svgalib and
> pthreads use SIGUSR1 & SIGUSR2 in their implementation. Can this be
> the problem in my case. Is there any way to know what signals are
> blocked when this hang happens.
> 
> I'm using glibc 2.2.4-19.3, on a RH linux 7.2 running 2.4.7 kernel.

If you compile svgalib, you can chose, by editing libvga.h which signals
to use. The default is to use SIGUNUSED and SIGPROF. I don't know what
RH chose for the library they distribute.

Remember that svgalib is not thread-safe. The easiest way to make sure
no problems arise is to have only one thread use the vga_ calls. All the
rest are only allowed to write to video memory.

-- 
Matan Ziv-Av.                         matan@svgalib.org



------------------------------------------------------------------
Unsubscribe:  To:   listbot@svgalib.org
              Body: unsubscribe linux-svgalib


This archive was generated by hypermail 2.1.4 : Wed 21 Jan 2004 - 22:10:24 IST