Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: jimb@red-bean.com
Cc: gdb@sourceware.org
Subject: gdb.threads/sigthread.c
Date: Mon, 18 Feb 2008 14:19:00 -0000	[thread overview]
Message-ID: <200802180903.m1I93FC0007574@brahms.sibelius.xs4all.nl> (raw)

Hi Jim,

You recently changed gdb.threads/sigthread.c to use barriers.
Unfortunately the pthread_barrier_xxx() interfaces are not found in
the standard POSIX threads standard, but part of the Advanced Realtime
Threads POSIX extension.  Therefore they are not widely available.

Could you change the test to use a more standard synchronisation
mechanism?  I guess having a global variable of type volatile
sig_atomic_t, setting it to a non-zero value in main() (after the
threads have been created) and checking the value in child_two() and
thread_function() (perhaps calling sched_yield() if the variables
isn't set yet) would do the trick.

I can roll you a diff to do this if you want, but I don't think I have
access to a system that shows the problem you tried to fix.

Thanks,

Mark






             reply	other threads:[~2008-02-18  9:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-18 14:19 Mark Kettenis [this message]
2008-02-19 18:03 ` gdb.threads/sigthread.c Jim Blandy

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=200802180903.m1I93FC0007574@brahms.sibelius.xs4all.nl \
    --to=mark.kettenis@xs4all.nl \
    --cc=gdb@sourceware.org \
    --cc=jimb@red-bean.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