commit | dbad18f00f1f3865c1b5002a560c18c5a7654f83 | [log] [tgz] |
---|---|---|
author | Jan Stancek <jstancek@redhat.com> | Tue Mar 13 11:32:24 2012 +0100 |
committer | Wanlong Gao <gaowanlong@cn.fujitsu.com> | Tue Mar 13 20:06:13 2012 +0800 |
tree | 1ae54163400be1650ae388460426c7f0da2d28ce | |
parent | 65c30be4caa51f777d823e43d5f5ca35eb317511 [diff] |
mmstress: make shared global variables volatile 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> Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>