public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Wanlong Gao <gaowanlong@cn.fujitsu.com>
To: Jan Stancek <jstancek@redhat.com>
Cc: ltp-list@lists.sourceforge.net, Jeffrey Burke <jburke@redhat.com>
Subject: Re: [LTP] [PATCH] mmstress: make shared global variables volatile
Date: Tue, 13 Mar 2012 20:09:32 +0800	[thread overview]
Message-ID: <4F5F38FC.7040001@cn.fujitsu.com> (raw)
In-Reply-To: <4F5F2238.9010402@redhat.com>

On 03/13/2012 06:32 PM, Jan Stancek wrote:

> 
> Synchronization of threads depends on shared global variable.
> With gcc version 4.6.2 this test spins forever on:
>     while (wait_thread)
>         sched_yield();
> 
> Make global shared variables volatile, so each thread
> sees current value.
> 
> See also:
> Bug 36081 - gcc optimizations and threads (pthread)
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36081
> 
> Signed-off-by: Jan Stancek <jstancek@redhat.com>
> ---
>  testcases/kernel/mem/mtest05/mmstress.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)


pushed, thanks Jan.

Wanlong Gao

> 
> 
> 
> 
> ------------------------------------------------------------------------------
> Keep Your Developer Skills Current with LearnDevNow!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-d2d
> 
> 
> 
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list



------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

      reply	other threads:[~2012-03-13 12:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-13 10:32 [LTP] [PATCH] mmstress: make shared global variables volatile Jan Stancek
2012-03-13 12:09 ` Wanlong Gao [this message]

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=4F5F38FC.7040001@cn.fujitsu.com \
    --to=gaowanlong@cn.fujitsu.com \
    --cc=jburke@redhat.com \
    --cc=jstancek@redhat.com \
    --cc=ltp-list@lists.sourceforge.net \
    /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