From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1S7QYu-0002sx-HR for ltp-list@lists.sourceforge.net; Tue, 13 Mar 2012 12:10:44 +0000 Received: from [222.73.24.84] (helo=song.cn.fujitsu.com) by sog-mx-3.v43.ch3.sourceforge.com with esmtp (Exim 4.76) id 1S7QYo-0004ua-0w for ltp-list@lists.sourceforge.net; Tue, 13 Mar 2012 12:10:44 +0000 Message-ID: <4F5F38FC.7040001@cn.fujitsu.com> Date: Tue, 13 Mar 2012 20:09:32 +0800 From: Wanlong Gao MIME-Version: 1.0 References: <4F5F2238.9010402@redhat.com> In-Reply-To: <4F5F2238.9010402@redhat.com> Subject: Re: [LTP] [PATCH] mmstress: make shared global variables volatile Reply-To: gaowanlong@cn.fujitsu.com List-Id: Linux Test Project General Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ltp-list-bounces@lists.sourceforge.net To: Jan Stancek Cc: ltp-list@lists.sourceforge.net, Jeffrey Burke 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 > --- > 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