mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-29 19:00:33 +02:00
Move notification out of block locking associated mutex in Gravity.cpp
I don't know how it ended up inside, I wanted it outside. For the record, signalling the CV while the associated mutex is locked is a pessimisation, it just yields predictable scheduling.
This commit is contained in:
@@ -125,12 +125,12 @@ void Gravity::gravity_update_async()
|
|||||||
signal_grav = true;
|
signal_grav = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (signal_grav)
|
if (signal_grav)
|
||||||
{
|
{
|
||||||
gravcv.notify_one();
|
gravcv.notify_one();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
//Apply the gravity mask
|
//Apply the gravity mask
|
||||||
membwand(gravy, gravmask, (XRES/CELL)*(YRES/CELL)*sizeof(float), (XRES/CELL)*(YRES/CELL)*sizeof(unsigned));
|
membwand(gravy, gravmask, (XRES/CELL)*(YRES/CELL)*sizeof(float), (XRES/CELL)*(YRES/CELL)*sizeof(unsigned));
|
||||||
membwand(gravx, gravmask, (XRES/CELL)*(YRES/CELL)*sizeof(float), (XRES/CELL)*(YRES/CELL)*sizeof(unsigned));
|
membwand(gravx, gravmask, (XRES/CELL)*(YRES/CELL)*sizeof(float), (XRES/CELL)*(YRES/CELL)*sizeof(unsigned));
|
||||||
|
Reference in New Issue
Block a user