Subject: SDL's SDL_Delay hanging; maybe pth issue.
To: None <tech-pkg@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 05/30/2003 19:52:00
I use SDL_Delay fine with a few packages.

But with tuxtype2 it hangs.

It uses pth. The SDL-1.2.5/src/timer/SDL_systimer.c code (after cpp) is:

 void SDL_Delay (Uint32 ms)
 {
         pth_time_t tv;
         tv.tv_sec  =  ms/1000;
         tv.tv_usec = (ms%1000)*1000;
         pth_nap(tv);
 }


The ktrace has:

  9718 tuxtype2 RET   gettimeofday 0
  9718 tuxtype2 CALL  __sigprocmask14(0,0,0x8062088)
  9718 tuxtype2 RET   __sigprocmask14 0
  9718 tuxtype2 CALL  __sigprocmask14(0x3,0x8062488,0)
  9718 tuxtype2 RET   __sigprocmask14 0
  9718 tuxtype2 CALL  gettimeofday(0x808be00,0)
  9718 tuxtype2 RET   gettimeofday 0
  9718 tuxtype2 CALL  write(0x7,0x807a000,0x1000)
  9718 tuxtype2 GIO   fd 7 wrote 4088 bytes
       "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
        \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
        \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
        \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
        \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
        \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
        \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\

and many more lines of \0

Does anyone have any hints on tracking down pth issues?

This tuxtype2 uses
         -lpthread.20 => /usr/pkg/lib/libpthread.so.20
         -lSDL.0 => /usr/pkg/lib/libSDL.so.0
         -lSDL_mixer-1.2.2 => /usr/pkg/lib/libSDL_mixer-1.2.so.2
         -lSDL_image-1.2.1 => /usr/pkg/lib/libSDL_image-1.2.so.1

I have:
 pth-2.0.0
 SDL-1.2.5nb4
 smpeg-0.4.4nb1
 SDL_mixer-1.2.5
 SDL_image-1.2.2nb1

(By the way, I have tuxtype2 in wip-pkgsrc.)

   Jeremy C. Reed
   http://bsd.reedmedia.net/