mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 07:07:23 +00:00
Kernel: Use atomic integer for next FIFO id
This commit is contained in:
committed by
Andreas Kling
parent
738e604bfc
commit
25d7beec6b
@@ -4,6 +4,7 @@
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <AK/Atomic.h>
|
||||
#include <AK/HashTable.h>
|
||||
#include <AK/Singleton.h>
|
||||
#include <AK/StdLibExtras.h>
|
||||
@@ -23,7 +24,7 @@ static Lockable<HashTable<FIFO*>>& all_fifos()
|
||||
return *s_table;
|
||||
}
|
||||
|
||||
static int s_next_fifo_id = 1;
|
||||
static Atomic<int> s_next_fifo_id = 1;
|
||||
|
||||
RefPtr<FIFO> FIFO::try_create(uid_t uid)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user