Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
bb4462a1
Commit
bb4462a1
authored
Oct 03, 2012
by
Pedro Gonnet
Browse files
force memory barrier on unlock.
Former-commit-id: 4e0eed1c3fd3aebe5b9f82ad085aa968dd40869e
parent
3147ec22
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/lock.h
View file @
bb4462a1
...
...
@@ -45,5 +45,5 @@
return
0
;
}
#define lock_trylock( l ) ( ( *(l) ) ? 1 : __sync_val_compare_and_swap( l , 0 , 1 ) )
#define lock_unlock( l ) ( __sync_
lock_test_and_set( l
, 0 ) != 1 )
#define lock_unlock( l ) ( __sync_
val_compare_and_swap( l , 1
, 0 ) != 1 )
#endif
src/runner.c
View file @
bb4462a1
...
...
@@ -1526,7 +1526,7 @@ struct task *queue_gettask ( struct queue *q , int blocking , int keep ) {
/* Bubble-up. */
q
->
count
=
qcount
-
1
;
for
(
;
k
<
qcount
;
k
++
)
for
(
;
k
<
qcount
-
1
;
k
++
)
qtid
[
k
]
=
qtid
[
k
+
1
];
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment