Implement ipc_netsockdelete() syscall and automatic dangling socket cleanup

This commit is contained in:
2025-10-29 21:21:35 +01:00
parent 7db6a8e130
commit 4417141216
12 changed files with 107 additions and 7 deletions

View File

@ -16,6 +16,7 @@ typedef struct IpcNetSock {
IpcPipe *datapipe;
RBufT eventbuffer;
SpinLock spinlock;
uint64_t ownerpid;
} IpcNetSock;
typedef struct {
@ -26,7 +27,9 @@ typedef struct {
extern IpcNetSocks IPC_NETSOCKS;
void ipc_netsockinit(void);
IpcNetSock *ipc_netsockmake(uint16_t net, uint16_t proto, uint16_t port);
IpcNetSock *ipc_netsockmake(uint16_t net, uint16_t proto, uint16_t port, uint64_t pid);
int32_t ipc_netsocklisten(IpcNetSock *netsock, size_t maxlisteners);
int32_t ipc_netsockdelete(IpcNetSock *netsock);
void ipc_netsock_cleanup_dangling(void);
#endif // NETSOCK_NETSOCK_H_