mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-01 15:08:21 +00:00
kernel: misc fixes
This commit is contained in:
@@ -55,12 +55,14 @@ typedef struct {
|
|||||||
#define DT_SOCK 12
|
#define DT_SOCK 12
|
||||||
#define DT_WHT 14
|
#define DT_WHT 14
|
||||||
|
|
||||||
|
#define NAME_MAX 255
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
ino_t d_ino;
|
ino_t d_ino;
|
||||||
off_t d_off;
|
off_t d_off;
|
||||||
unsigned short d_reclen;
|
unsigned short d_reclen;
|
||||||
unsigned char d_type;
|
unsigned char d_type;
|
||||||
char d_name[1024];
|
char d_name[NAME_MAX+1];
|
||||||
} dent_t;
|
} dent_t;
|
||||||
|
|
||||||
#define TYPE_FIFO 1
|
#define TYPE_FIFO 1
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#ifndef _IDT_H
|
#ifndef _IDT_H
|
||||||
#define _IDT_h
|
#define _IDT_H
|
||||||
|
|
||||||
void arch_idt_reload();
|
void arch_idt_reload();
|
||||||
void arch_idt_setup();
|
void arch_idt_setup();
|
||||||
|
|||||||
@@ -906,6 +906,7 @@ vmmcontext_t *vmm_fork(vmmcontext_t *oldcontext) {
|
|||||||
range = range->next;
|
range = range->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO do only userspace invalidation as to not send ipi to all cores
|
||||||
arch_mmu_invalidate_range(NULL, 0);
|
arch_mmu_invalidate_range(NULL, 0);
|
||||||
|
|
||||||
MUTEX_RELEASE(&oldcontext->space.lock);
|
MUTEX_RELEASE(&oldcontext->space.lock);
|
||||||
|
|||||||
@@ -579,7 +579,7 @@ bool signal_check(struct thread_t *thread, context_t *context, bool syscall, uin
|
|||||||
|
|
||||||
memset(&sigframe->siginfo, 0, sizeof(siginfo_t));
|
memset(&sigframe->siginfo, 0, sizeof(siginfo_t));
|
||||||
if (signal == SIGSEGV)
|
if (signal == SIGSEGV)
|
||||||
sigframe->siginfo.__si_fields.__sigfault.si_addr = CTX_TRAP_ADDR(context);
|
sigframe->siginfo.__si_fields.__sigfault.si_addr = (void *)CTX_TRAP_ADDR(context);
|
||||||
|
|
||||||
if (usercopy_touser(stack, sigframe, ARCH_SIGFRAME_SIZE)) {
|
if (usercopy_touser(stack, sigframe, ARCH_SIGFRAME_SIZE)) {
|
||||||
printf("signal: bad user stack %p (altstack %p) handling signal %d trapno %lu\n", stack, altstack, signal, sigframe->mcontext.gregs[MCONTEXT_REG_TRAPNO]);
|
printf("signal: bad user stack %p (altstack %p) handling signal %d trapno %lu\n", stack, altstack, signal, sigframe->mcontext.gregs[MCONTEXT_REG_TRAPNO]);
|
||||||
|
|||||||
Reference in New Issue
Block a user