mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-29 05:55:16 -04:00
ams: revamp assertion system
This commit is contained in:
parent
9572fb2ce3
commit
40400aee1f
168 changed files with 1014 additions and 696 deletions
|
@ -65,7 +65,7 @@ namespace ams::os {
|
|||
void Semaphore::Release() {
|
||||
std::scoped_lock lk(this->mutex);
|
||||
|
||||
AMS_ASSERT(this->count + 1 <= this->max_count);
|
||||
AMS_ABORT_UNLESS(this->count + 1 <= this->max_count);
|
||||
this->count++;
|
||||
|
||||
this->condvar.Signal();
|
||||
|
@ -75,7 +75,7 @@ namespace ams::os {
|
|||
void Semaphore::Release(int count) {
|
||||
std::scoped_lock lk(this->mutex);
|
||||
|
||||
AMS_ASSERT(this->count + count <= this->max_count);
|
||||
AMS_ABORT_UNLESS(this->count + count <= this->max_count);
|
||||
this->count += count;
|
||||
|
||||
this->condvar.Broadcast();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue