diff --git a/sys/include/sys/signal.h b/sys/include/sys/signal.h index eaa3d9e..2e0b908 100644 --- a/sys/include/sys/signal.h +++ b/sys/include/sys/signal.h @@ -43,12 +43,6 @@ #define SIG_UNBLOCK 2 /* unblock specified signal set */ #define SIG_SETMASK 3 /* set specified signal set */ -typedef struct __sigset { - __uint32_t __bits[_SIG_WORDS]; - } __sigset_t; - -typedef __sigset_t sigset_t; - // Signal vector "template" used in sigaction call. struct sigaction { union { diff --git a/sys/kernel/descrip.c b/sys/kernel/descrip.c index f2a0539..180e9bf 100644 --- a/sys/kernel/descrip.c +++ b/sys/kernel/descrip.c @@ -257,21 +257,21 @@ error = -1; if (args->in != 0x0) { - for (i = 0; i < args->nd; i++) { + for (i = 0; i < MAX_FILES; i++) { if (!FD_ISSET(((struct file * ) td->o_files[args->ou[0]]).socket, &sock_rfds)) FD_CLR(((struct file * ) td->o_files[args->ou[0]]).socket, args->in); } } if (args->ou != 0x0) { - for (i = 0; i < args->nd; i++) { + for (i = 0; i < MAX_FILES; i++) { if (!FD_ISSET(((struct file * ) td->o_files[args->ou[0]]).socket, &sock_wfds)) FD_CLR(((struct file * ) td->o_files[args->ou[0]]).socket, args->ou); } } if (args->ex != 0x0) { - for (i = 0; i < args->nd; i++) { + for (i = 0; i < MAX_FILES; i++) { if (!FD_ISSET(((struct file * ) td->o_files[args->ou[0]]).socket, &sock_efds)) FD_CLR(((struct file * ) td->o_files[args->ou[0]]).socket, args->ex); } diff --git a/sys/net/net/sys_arch.c b/sys/net/net/sys_arch.c index e66b4f0..4df7969 100644 --- a/sys/net/net/sys_arch.c +++ b/sys/net/net/sys_arch.c @@ -55,8 +55,9 @@ ubthread_cond_init(&(newSem->cond), NULL); ubthread_mutex_init(&(newSem->mutex), NULL); - if (*sem != 0) + if (*sem != 0) { kpanic("UH OH!"); + } *sem = newSem; @@ -67,6 +68,7 @@ void sys_sem_free(struct sys_sem **sem) { if ((sem != NULL) && (*sem != SYS_SEM_NULL)) { sys_sem_free_internal(*sem); + *sem = 0x0; } } @@ -191,6 +193,7 @@ sys_sem_free_internal(mbox->lock); mbox->full = mbox->empty = mbox->lock = NULL; kfree(mbox); + *mb = 0x0; } //kfree(mbox->queue); //mbox->queue = NULL; @@ -489,17 +492,10 @@ int fd = 0x0; struct file *nfp = 0x0; - /* error = falloc(td, &nfp, &fd); if (error) return (error); - */ - - //MrOlsen - fd = lwip_socket(args->domain, args->type, args->protocol); - - nfp = (struct file *) td->o_files[fd]; nfp->socket = lwip_socket(args->domain, args->type, args->protocol); nfp->fd_type = 2;