1
Fork 0
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:
Jean-Baptiste Boric 2021-07-18 11:45:13 +02:00 committed by Andreas Kling
parent 738e604bfc
commit 25d7beec6b

View file

@ -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)
{