aboutsummaryrefslogtreecommitdiff
path: root/kernel/features
diff options
context:
space:
mode:
authorMarvin Borner2020-08-23 15:49:22 +0200
committerMarvin Borner2020-08-23 15:49:22 +0200
commitc2cccf6f2ef4f6f8c828074e68be2d95255a89b5 (patch)
treee04d17c13c872e976ff09a066f42a5eaf9e437ea /kernel/features
parentb1faf9042c5104d7dafc7d880817def934086ddb (diff)
Added bmp loading and other stuff
Diffstat (limited to 'kernel/features')
-rw-r--r--kernel/features/fs.c1
-rw-r--r--kernel/features/proc.c1
-rw-r--r--kernel/features/syscall.c6
3 files changed, 5 insertions, 3 deletions
diff --git a/kernel/features/fs.c b/kernel/features/fs.c
index f23ccc0..7a9f209 100644
--- a/kernel/features/fs.c
+++ b/kernel/features/fs.c
@@ -84,6 +84,7 @@ void *read_inode(struct inode *in)
data = buffer_read(blocknum);
memcpy((u32 *)((u32)buf + (i - 1) * BLOCK_SIZE), data, BLOCK_SIZE);
}
+ /* printf("Loaded %d of %d\n", i + 1, num_blocks); */
}
return buf;
diff --git a/kernel/features/proc.c b/kernel/features/proc.c
index ac62195..d358faa 100644
--- a/kernel/features/proc.c
+++ b/kernel/features/proc.c
@@ -100,6 +100,7 @@ struct proc *proc_current()
void proc_send(struct proc *src, struct proc *dest, enum message_type type, void *data)
{
+ // TODO: Use unique key instead of pid for IPC messaging
assert(src && dest);
struct proc_message *msg = malloc(sizeof(*msg));
msg->src = src;
diff --git a/kernel/features/syscall.c b/kernel/features/syscall.c
index 4197985..e876553 100644
--- a/kernel/features/syscall.c
+++ b/kernel/features/syscall.c
@@ -17,7 +17,7 @@ void syscall_handler(struct regs *r)
enum sys num = r->eax;
r->eax = 0;
- if (num != SYS_RECEIVE && num != SYS_YIELD)
+ if (num != SYS_RECEIVE && num != SYS_YIELD && num != SYS_TIME)
printf("[SYSCALL] %d: ", num);
switch (num) {
@@ -33,7 +33,7 @@ void syscall_handler(struct regs *r)
}
case SYS_FREE: {
printf("free\n");
- free(r->eax);
+ free(r->ebx);
break;
}
case SYS_READ: {
@@ -75,7 +75,7 @@ void syscall_handler(struct regs *r)
break;
}
case SYS_TIME: {
- printf("time\n");
+ /* printf("time\n"); */
r->eax = timer_get();
break;
}