Fixing warnings and small fixes.
This commit is contained in:
parent
bad9c2b470
commit
3ada1a4fcc
@ -1198,9 +1198,7 @@ db_disasm_esc(loc, inst, rex, short_addr, size, seg)
|
||||
* next instruction.
|
||||
*/
|
||||
uintptr_t
|
||||
db_disasm(loc, altfmt)
|
||||
uintptr_t loc;
|
||||
bool altfmt;
|
||||
db_disasm(uintptr_t loc, bool altfmt)
|
||||
{
|
||||
int inst;
|
||||
int size;
|
||||
|
@ -26,6 +26,7 @@ extern void PS2_Init();
|
||||
extern void PCI_Init();
|
||||
extern void IDE_Init();
|
||||
extern void MachineBoot_AddMem();
|
||||
extern void Loader_LoadInit();
|
||||
|
||||
#define GDT_MAX 8
|
||||
|
||||
@ -150,7 +151,7 @@ void Machine_Init()
|
||||
VFS_MountRoot(root);
|
||||
|
||||
Critical_Exit();
|
||||
|
||||
|
||||
Thread *thr = Thread_KThreadCreate(&Machine_IdleThread, NULL);
|
||||
if (thr == NULL) {
|
||||
kprintf("Couldn't create idle thread!\n");
|
||||
|
@ -2,6 +2,8 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#include <sys/kassert.h>
|
||||
#include <sys/kmem.h>
|
||||
#include <sys/thread.h>
|
||||
@ -77,7 +79,7 @@ Syscall_MUnmap(uint64_t addr, uint64_t len)
|
||||
uint64_t
|
||||
Syscall_MProtect(uint64_t addr, uint64_t len, uint64_t prot)
|
||||
{
|
||||
Thread *cur = Thread_Current();
|
||||
//Thread *cur = Thread_Current();
|
||||
NOT_IMPLEMENTED();
|
||||
return 0;
|
||||
}
|
||||
@ -89,7 +91,7 @@ Syscall_Read(uint64_t fd, uint64_t addr, uint64_t off, uint64_t length)
|
||||
Handle *handle = Handle_Lookup(cur, fd);
|
||||
|
||||
if (handle == NULL)
|
||||
return -1;
|
||||
return -EBADF;
|
||||
|
||||
// Verify memory region and pin
|
||||
|
||||
@ -103,7 +105,7 @@ Syscall_Write(uint64_t fd, uint64_t addr, uint64_t off, uint64_t length)
|
||||
Handle *handle = Handle_Lookup(cur, fd);
|
||||
|
||||
if (handle == NULL)
|
||||
return -1;
|
||||
return -EBADF;
|
||||
|
||||
// Verify memory region and pin
|
||||
|
||||
@ -117,7 +119,7 @@ Syscall_Flush(uint64_t fd)
|
||||
Handle *handle = Handle_Lookup(cur, fd);
|
||||
|
||||
if (handle == NULL)
|
||||
return -1;
|
||||
return -EBADF;
|
||||
|
||||
return (handle->flush)(handle);
|
||||
}
|
||||
@ -136,7 +138,7 @@ Syscall_Close(uint64_t fd)
|
||||
Handle *handle = Handle_Lookup(cur, fd);
|
||||
|
||||
if (handle == NULL)
|
||||
return -1;
|
||||
return -EBADF;
|
||||
|
||||
return (handle->close)(handle);
|
||||
}
|
||||
|
@ -63,6 +63,7 @@ Thread_Create()
|
||||
}
|
||||
|
||||
thr->schedState = SCHED_STATE_NULL;
|
||||
thr->nextFD = 0;
|
||||
|
||||
Handle_Init(thr);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user