LibIPC: Move AutoCloseFileDescriptor to its own header

This commit is contained in:
stasoid 2025-05-17 18:18:57 +05:00 committed by Andrew Kaster
commit ccf303eefc
Notes: github-actions[bot] 2025-06-17 21:38:15 +00:00
4 changed files with 42 additions and 29 deletions

View file

@ -10,6 +10,7 @@
#include <AK/MemoryStream.h>
#include <AK/Queue.h>
#include <LibCore/Socket.h>
#include <LibIPC/AutoCloseFileDescriptor.h>
#include <LibIPC/File.h>
#include <LibThreading/ConditionVariable.h>
#include <LibThreading/MutexProtected.h>
@ -18,24 +19,6 @@
namespace IPC {
class AutoCloseFileDescriptor : public RefCounted<AutoCloseFileDescriptor> {
public:
AutoCloseFileDescriptor(int fd);
~AutoCloseFileDescriptor();
int value() const { return m_fd; }
int take_fd()
{
int fd = m_fd;
m_fd = -1;
return fd;
}
private:
int m_fd;
};
class SendQueue : public AtomicRefCounted<SendQueue> {
public:
enum class Running {