mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:48:11 +00:00
Kernel: Use atomic integer for next FIFO id
This commit is contained in:
parent
738e604bfc
commit
25d7beec6b
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue