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
64a8d3a3
Commit
64a8d3a3
authored
Mar 25, 2020
by
Matthieu Schaller
Browse files
Removed the error message in the cell locking/unlocking
parent
65391edd
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/cell.c
View file @
64a8d3a3
...
...
@@ -1228,7 +1228,7 @@ int cell_unpack_sf_counts(struct cell *restrict c,
* @return 0 on success, 1 on failure
*/
int
cell_locktree
(
struct
cell
*
c
)
{
TIMER_TIC
TIMER_TIC
;
/* First of all, try to lock this cell. */
if
(
c
->
hydro
.
hold
||
lock_trylock
(
&
c
->
hydro
.
lock
)
!=
0
)
{
...
...
@@ -1350,8 +1350,6 @@ int cell_glocktree(struct cell *c) {
int
cell_mlocktree
(
struct
cell
*
c
)
{
TIMER_TIC
;
error
(
"aa"
);
/* First of all, try to lock this cell. */
if
(
c
->
grav
.
mhold
||
lock_trylock
(
&
c
->
grav
.
mlock
)
!=
0
)
{
TIMER_TOC
(
timer_locktree
);
...
...
@@ -1410,7 +1408,7 @@ int cell_mlocktree(struct cell *c) {
* @return 0 on success, 1 on failure
*/
int
cell_slocktree
(
struct
cell
*
c
)
{
TIMER_TIC
TIMER_TIC
;
/* First of all, try to lock this cell. */
if
(
c
->
stars
.
hold
||
lock_trylock
(
&
c
->
stars
.
lock
)
!=
0
)
{
...
...
@@ -1470,7 +1468,7 @@ int cell_slocktree(struct cell *c) {
* @return 0 on success, 1 on failure
*/
int
cell_blocktree
(
struct
cell
*
c
)
{
TIMER_TIC
TIMER_TIC
;
/* First of all, try to lock this cell. */
if
(
c
->
black_holes
.
hold
||
lock_trylock
(
&
c
->
black_holes
.
lock
)
!=
0
)
{
...
...
@@ -1530,7 +1528,7 @@ int cell_blocktree(struct cell *c) {
* @param c The #cell.
*/
void
cell_unlocktree
(
struct
cell
*
c
)
{
TIMER_TIC
TIMER_TIC
;
/* First of all, try to unlock this cell. */
if
(
lock_unlock
(
&
c
->
hydro
.
lock
)
!=
0
)
error
(
"Failed to unlock cell."
);
...
...
@@ -1568,8 +1566,6 @@ void cell_gunlocktree(struct cell *c) {
void
cell_munlocktree
(
struct
cell
*
c
)
{
TIMER_TIC
;
error
(
"aa"
);
/* First of all, try to unlock this cell. */
if
(
lock_unlock
(
&
c
->
grav
.
mlock
)
!=
0
)
error
(
"Failed to unlock cell."
);
...
...
@@ -1586,7 +1582,7 @@ void cell_munlocktree(struct cell *c) {
* @param c The #cell.
*/
void
cell_sunlocktree
(
struct
cell
*
c
)
{
TIMER_TIC
TIMER_TIC
;
/* First of all, try to unlock this cell. */
if
(
lock_unlock
(
&
c
->
stars
.
lock
)
!=
0
)
error
(
"Failed to unlock cell."
);
...
...
@@ -1604,7 +1600,7 @@ void cell_sunlocktree(struct cell *c) {
* @param c The #cell.
*/
void
cell_bunlocktree
(
struct
cell
*
c
)
{
TIMER_TIC
TIMER_TIC
;
/* First of all, try to unlock this cell. */
if
(
lock_unlock
(
&
c
->
black_holes
.
lock
)
!=
0
)
error
(
"Failed to unlock cell."
);
...
...
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