Remove bcast pipes

This commit is contained in:
2025-10-04 14:43:24 +02:00
parent ef9393e694
commit 0117080b61
4 changed files with 0 additions and 40 deletions

View File

@ -139,7 +139,6 @@ Proc *proc_spawnuser(char *mountpoint, char *path) {
proc->state = PROC_EMBRYO;
proc->pid = pids++;
proc->mman_map_base = PROC_MMAN_MAP_BASE;
spinlock_init(&proc->bcast_pipes.spinlock);
spinlock_init(&proc->pipes_spinlock);
spinlock_init(&proc->devs_spinlock);

View File

@ -60,11 +60,6 @@ typedef struct Proc {
IpcPipe *pipes[PROC_PIPEHANDLES_MAX];
SpinLock pipes_spinlock;
struct {
IpcPipe *list;
SpinLock spinlock;
} bcast_pipes;
Dev *devs[PROC_DEVHANDLES_MAX];
SpinLock devs_spinlock;

View File

@ -122,39 +122,6 @@ int32_t SYSCALL5(sys_ipcpipe, pid1, pipenum1, cmd1, buffer1, len1) {
ret = ipc_piperead(pipe, buffer, len1);
} break;
case IPCPIPE_ADD_BCAST: {
if (pipenum >= PROC_PIPEHANDLES_MAX) {
ret = E_NOMEMORY;
goto done;
}
spinlock_acquire(&proc->pipes_spinlock);
IpcPipe *pipe = proc->pipes[pipenum];
spinlock_release(&proc->pipes_spinlock);
if (pipe == NULL) {
ret = E_INVALIDARGUMENT;
goto done;
}
uint64_t pid2 = len1;
Proc *proc2 = NULL;
spinlock_acquire(&PROCS.spinlock);
LL_FINDPROP(PROCS.procs, proc2, pid, pid2);
spinlock_release(&PROCS.spinlock);
if (proc2 == NULL) {
ret = E_INVALIDARGUMENT;
goto done;
}
spinlock_acquire(&proc2->bcast_pipes.spinlock);
LL_APPEND(proc2->bcast_pipes.list, pipe);
spinlock_release(&proc2->bcast_pipes.spinlock);
ret = E_OK;
} break;
case IPCPIPE_REPLACE: {
if (pipenum >= PROC_PIPEHANDLES_MAX) {
ret = E_NOMEMORY;