aboutsummaryrefslogtreecommitdiff
path: root/kernel/features/syscall.c
diff options
context:
space:
mode:
authorMarvin Borner2020-11-18 17:53:31 +0100
committerMarvin Borner2020-11-18 17:53:31 +0100
commita5a04ef3de6ad3f81d37a04fede23eb3b4b348b1 (patch)
tree555496762aaa15e810bf3038bd2d444d68931d65 /kernel/features/syscall.c
parent431c88102153b8b41a15a1105e291ecf161c030e (diff)
Added browser and many networking things
Diffstat (limited to 'kernel/features/syscall.c')
-rw-r--r--kernel/features/syscall.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/features/syscall.c b/kernel/features/syscall.c
index b601d96..3ee5a82 100644
--- a/kernel/features/syscall.c
+++ b/kernel/features/syscall.c
@@ -108,6 +108,14 @@ void syscall_handler(struct regs *r)
net_send((void *)r->ebx, (void *)r->ecx, r->edx);
break;
}
+ case SYS_NET_RECEIVE: {
+ if (!net_data_available((void *)r->ebx)) {
+ proc_current()->state = PROC_SLEEPING;
+ proc_yield(r);
+ }
+ r->eax = net_receive((void *)r->ebx, (void *)r->ecx, r->edx);
+ break;
+ }
default: {
print("Unknown syscall!\n");
break;