Skip to content

Commit

Permalink
2009-04-10 Zoltan Varga <[email protected]>
Browse files Browse the repository at this point in the history
	* include/private/gc_locks.h (GC_test_and_set): Merge a change from libgc
	7.1's libatomic-ops to fix the ppc build with gcc 4.4.

svn path=/trunk/mono/; revision=131471
  • Loading branch information
vargaz committed Apr 10, 2009
1 parent dbbe281 commit b5a53bc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions libgc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2009-04-10 Zoltan Varga <[email protected]>

* include/private/gc_locks.h (GC_test_and_set): Merge a change from libgc
7.1's libatomic-ops to fix the ppc build with gcc 4.4.

2009-02-23 Zoltan Varga <[email protected]>

* os_dep.c (GC_init_linux_data_start): Avoid the call to GC_find_limit ()
Expand Down
6 changes: 3 additions & 3 deletions libgc/include/private/gc_locks.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,15 +160,15 @@
int temp = 1; /* locked value */

__asm__ __volatile__(
"1:\tlwarx %0,0,%3\n" /* load and reserve */
"1:\tlwarx %0,0,%1\n" /* load and reserve */
"\tcmpwi %0, 0\n" /* if load is */
"\tbne 2f\n" /* non-zero, return already set */
"\tstwcx. %2,0,%1\n" /* else store conditional */
"\tbne- 1b\n" /* retry if lost reservation */
"\tsync\n" /* import barrier */
"2:\t\n" /* oldval is zero if we set */
: "=&r"(oldval), "=p"(addr)
: "r"(temp), "1"(addr)
: "=&r"(oldval)
: "r"(addr), "r"(temp)
: "cr0","memory");
return oldval;
}
Expand Down

0 comments on commit b5a53bc

Please sign in to comment.