Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* re: posix semaphores not working under gdb
@ 2005-12-01  7:55 Kenny Simpson
  2005-12-01 13:16 ` Daniel Juan
  0 siblings, 1 reply; 6+ messages in thread
From: Kenny Simpson @ 2005-12-01  7:55 UTC (permalink / raw)
  To: daniel.juan; +Cc: gdb

One thing that caused me some pain a while ago is the semaphore behavioral change in NPTL vs
LinuxThreads.  Under LinuxThreads, sem_wait will never return until the semaphore is aquired. 
With NPTL, sem_wait can return EINTR
... and DOES when gdb attaches.

The man pages in many distrubutions still have the old LinuxThreads documentation which explictly
states that sem_wait will not be affected by signals.

Hope this helps...
-Kenny



	
		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com


^ permalink raw reply	[flat|nested] 6+ messages in thread
* posix semaphores not working under gdb
@ 2005-11-30 10:03 Daniel Juan
  2005-11-30 10:40 ` Jim Blandy
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Juan @ 2005-11-30 10:03 UTC (permalink / raw)
  To: gdb

Hi,

I'm trying to debug a multithreaded application whith gdb ( using ddd
gui) and it seems that posix semaphores (sem_wait, sem_post) are not
working as expected when I run the app in the debugger.

Basically, the application has two semaphorized threads:
      - an openGL drawing one, and  a message processing one. (while
drawing, it's not permitted to process, and vice versa).

and it seems that, when I run the app whith the debugger, sometimes,
the processing thread unlocks the semaphore (and starts processing) 
while drawing is being done.

I don't know what I'm doing wrong.

Has someone experienced any similar issue?

# gdb --version
GNU gdb 6.3-debian

# g++ --version
g++ (GCC) 3.3.5 (Debian 1:3.3.5-13)

# uname -roms
Linux 2.6.11.7-mppe i686 GNU/Linux

Thanks a lot.

--
Daniel Juan Boned
e-mail: daniel(dot)juan(at)gmail.com


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-12-01 23:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-01  7:55 posix semaphores not working under gdb Kenny Simpson
2005-12-01 13:16 ` Daniel Juan
2005-12-01 23:33   ` Jim Blandy
  -- strict thread matches above, loose matches on Subject: below --
2005-11-30 10:03 Daniel Juan
2005-11-30 10:40 ` Jim Blandy
2005-11-30 17:51   ` Daniel Juan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox