Fix ring reader ignoring signals and unqueuing threads twice

This commit is contained in:
Mark
2020-02-05 13:28:11 +02:00
parent 533bc8567a
commit 41ae3d7aab
7 changed files with 33 additions and 21 deletions
+3 -2
View File
@@ -24,6 +24,7 @@
#define CPU_THREAD 0x08
#define CPU_TSS 0x10
#define CPU_SYSCALL_RSP 0x18
#define CPU_ID 0x28
#define TSS_RSP0 0x04
@@ -37,9 +38,9 @@ struct cpu {
struct thread *thread; // 0x08
amd64_tss_t *tss; // 0x10
uint64_t syscall_rsp; // 0x18
uint64_t ticks;
uint64_t ticks; // 0x20
uint64_t processor_id;
uint64_t processor_id; // 0x28
// No need to define offsets for these: ther're not accessed
// from assembly
-1
View File
@@ -34,7 +34,6 @@ extern struct cpu cpus[AMD64_MAX_SMP];
static inline struct cpu *get_cpu(void) {
struct cpu *cpu;
_assert(rdmsr(MSR_IA32_KERNEL_GS_BASE));
asm volatile ("movq %%gs:0, %0":"=r"(cpu));
return cpu;
}