mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:07:35 +00:00
Kernel: Move Singleton class to AK
This commit is contained in:
parent
0e69ebbce4
commit
f0906250a1
31 changed files with 87 additions and 71 deletions
|
@ -24,11 +24,11 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <AK/Singleton.h>
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <AK/StringView.h>
|
||||
#include <Kernel/FileSystem/DevPtsFS.h>
|
||||
#include <Kernel/FileSystem/VirtualFileSystem.h>
|
||||
#include <Kernel/Singleton.h>
|
||||
#include <Kernel/TTY/SlavePTY.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
@ -46,7 +46,7 @@ DevPtsFS::~DevPtsFS()
|
|||
{
|
||||
}
|
||||
|
||||
static auto s_ptys = make_singleton<HashTable<unsigned>>();
|
||||
static auto s_ptys = AK::make_singleton<HashTable<unsigned>>();
|
||||
|
||||
bool DevPtsFS::initialize()
|
||||
{
|
||||
|
|
|
@ -25,20 +25,20 @@
|
|||
*/
|
||||
|
||||
#include <AK/HashTable.h>
|
||||
#include <AK/Singleton.h>
|
||||
#include <AK/StdLibExtras.h>
|
||||
#include <AK/StringView.h>
|
||||
#include <Kernel/FileSystem/FIFO.h>
|
||||
#include <Kernel/FileSystem/FileDescription.h>
|
||||
#include <Kernel/Lock.h>
|
||||
#include <Kernel/Process.h>
|
||||
#include <Kernel/Singleton.h>
|
||||
#include <Kernel/Thread.h>
|
||||
|
||||
//#define FIFO_DEBUG
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
static auto s_table = make_singleton<Lockable<HashTable<FIFO*>>>();
|
||||
static auto s_table = AK::make_singleton<Lockable<HashTable<FIFO*>>>();
|
||||
|
||||
static Lockable<HashTable<FIFO*>>& all_fifos()
|
||||
{
|
||||
|
|
|
@ -26,19 +26,19 @@
|
|||
|
||||
#include <AK/Assertions.h>
|
||||
#include <AK/HashMap.h>
|
||||
#include <AK/Singleton.h>
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <AK/StringView.h>
|
||||
#include <Kernel/FileSystem/FileSystem.h>
|
||||
#include <Kernel/FileSystem/Inode.h>
|
||||
#include <Kernel/Net/LocalSocket.h>
|
||||
#include <Kernel/Singleton.h>
|
||||
#include <Kernel/VM/MemoryManager.h>
|
||||
#include <LibC/errno_numbers.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
static u32 s_lastFileSystemID;
|
||||
static auto s_fs_map = make_singleton<HashMap<u32, FS*>>();
|
||||
static auto s_fs_map = AK::make_singleton<HashMap<u32, FS*>>();
|
||||
|
||||
static HashMap<u32, FS*>& all_fses()
|
||||
{
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
*/
|
||||
|
||||
#include <AK/NonnullRefPtrVector.h>
|
||||
#include <AK/Singleton.h>
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <AK/StringView.h>
|
||||
#include <Kernel/FileSystem/Custody.h>
|
||||
|
@ -33,13 +34,12 @@
|
|||
#include <Kernel/FileSystem/VirtualFileSystem.h>
|
||||
#include <Kernel/KBufferBuilder.h>
|
||||
#include <Kernel/Net/LocalSocket.h>
|
||||
#include <Kernel/Singleton.h>
|
||||
#include <Kernel/VM/SharedInodeVMObject.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
static SpinLock s_all_inodes_lock;
|
||||
static auto s_list = make_singleton<InlineLinkedList<Inode>>();
|
||||
static auto s_list = AK::make_singleton<InlineLinkedList<Inode>>();
|
||||
|
||||
InlineLinkedList<Inode>& Inode::all_with_lock()
|
||||
{
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
*/
|
||||
|
||||
#include <AK/LexicalPath.h>
|
||||
#include <AK/Singleton.h>
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <Kernel/Devices/BlockDevice.h>
|
||||
#include <Kernel/FileSystem/Custody.h>
|
||||
|
@ -34,14 +35,13 @@
|
|||
#include <Kernel/FileSystem/VirtualFileSystem.h>
|
||||
#include <Kernel/KSyms.h>
|
||||
#include <Kernel/Process.h>
|
||||
#include <Kernel/Singleton.h>
|
||||
#include <LibC/errno_numbers.h>
|
||||
|
||||
//#define VFS_DEBUG
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
static auto s_the = make_singleton<VFS>();
|
||||
static auto s_the = AK::make_singleton<VFS>();
|
||||
static constexpr int symlink_recursion_limit { 5 }; // FIXME: increase?
|
||||
static constexpr int root_mount_flags = MS_NODEV | MS_NOSUID | MS_RDONLY;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue