From 25d7beec6bbc189155a87212781b0281fd214c91 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Boric Date: Sun, 18 Jul 2021 11:45:13 +0200 Subject: Kernel: Use atomic integer for next FIFO id --- Kernel/FileSystem/FIFO.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Kernel/FileSystem') diff --git a/Kernel/FileSystem/FIFO.cpp b/Kernel/FileSystem/FIFO.cpp index 62aab80058..87a5c4e628 100644 --- a/Kernel/FileSystem/FIFO.cpp +++ b/Kernel/FileSystem/FIFO.cpp @@ -4,6 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ +#include #include #include #include @@ -23,7 +24,7 @@ static Lockable>& all_fifos() return *s_table; } -static int s_next_fifo_id = 1; +static Atomic s_next_fifo_id = 1; RefPtr FIFO::try_create(uid_t uid) { -- cgit v1.2.3