local sockets: initial implementation

This commit is contained in:
Matheus
2024-04-13 21:00:10 -03:00
parent 2a0a32cfa3
commit 77105115f9
5 changed files with 763 additions and 9 deletions
+7
View File
@@ -6,6 +6,7 @@
#include <errno.h>
#include <arch/cpu.h>
#include <kernel/poll.h>
#include <kernel/sock.h>
#define PATHNAME_MAX 512
#define MAXLINKDEPTH 64
@@ -53,6 +54,12 @@ int vfs_register(vfsops_t *ops, char *name) {
return hashtable_set(&fstable, ops, name, strlen(name), true);
}
void vfs_inactive(vnode_t *vnode) {
if (vnode->socketbinding)
localsock_leavebinding(vnode);
vnode->ops->inactive(vnode);
}
int vfs_mount(vnode_t *backing, vnode_t *pathref, char *path, char *name, void *data) {
vfsops_t *ops;
int err = hashtable_get(&fstable, (void **)(&ops), name, strlen(name));