Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Juan <daniel.juan@gmail.com>
To: Kenny Simpson <theonetruekenny@yahoo.com>
Cc: gdb@sourceware.org
Subject: Re: posix semaphores not working under gdb
Date: Thu, 01 Dec 2005 13:16:00 -0000	[thread overview]
Message-ID: <f69bc2d80512010515r660de54aga19a011ba5c55a05@mail.gmail.com> (raw)
In-Reply-To: <20051201075511.62566.qmail@web34107.mail.mud.yahoo.com>

You are right Kenny,

if you look at the doc in NTPL:

man 3p sem_wait

The  sem_trywait()  and sem_wait() functions shall return zero if the
calling process successfully performed the semaphore lock operation on
the semaphore designated by sem.If the call was unsuccessful, the
state of the semaphore shall be unchanged, and the function shall
return a value of -1 and set errno to indicate the error.


If you look at Linuxthreads

man 3 sem_wait

The sem_wait and sem_getvalue functions always return 0.


Thanks

On 12/1/05, Kenny Simpson <theonetruekenny@yahoo.com> wrote:
> 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
>


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


  reply	other threads:[~2005-12-01 13:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-01  7:55 Kenny Simpson
2005-12-01 13:16 ` Daniel Juan [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f69bc2d80512010515r660de54aga19a011ba5c55a05@mail.gmail.com \
    --to=daniel.juan@gmail.com \
    --cc=gdb@sourceware.org \
    --cc=theonetruekenny@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox