Skip to content

Commit

Permalink
5.05 patch
Browse files Browse the repository at this point in the history
fix name thingy sleep -> flags
  • Loading branch information
ChendoChap committed Apr 22, 2019
1 parent 30e45a5 commit 87904b9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions kpayload/include/magic.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
#define __mtx_init 0x402780
#define __mtx_lock_spin_flags 0x402100
#define __mtx_unlock_spin_flags 0x4022C0
#define __mtx_lock_sleep 0x401CD0
#define __mtx_unlock_sleep 0x401FA0
#define __mtx_lock_flags 0x401CD0
#define __mtx_unlock_flags 0x401FA0
#define __fpu_kern_enter 0x1BFF90
#define __fpu_kern_leave 0x1C0090
#define __kern_reboot 0x10D390
Expand Down
4 changes: 2 additions & 2 deletions kpayload/include/resolve.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ void (*sx_xunlock)(struct sx *sx);
void (*mtx_init)(struct mtx *mutex, const char *name, const char *type, int opts);
void (*mtx_lock_spin_flags)(struct mtx *mutex, int flags);
void (*mtx_unlock_spin_flags)(struct mtx *mutex, int flags);
void (*mtx_lock_sleep)(struct mtx *mutex, int flags);
void (*mtx_unlock_sleep)(struct mtx *mutex, int flags);
void (*mtx_lock_flags)(struct mtx *mutex, int flags);
void (*mtx_unlock_flags)(struct mtx *mutex, int flags);
int (*fpu_kern_enter)(struct thread *td, void *ctx, unsigned int flags);
int (*fpu_kern_leave)(struct thread *td, void *ctx);
void (*kern_reboot)(int magic);
Expand Down
4 changes: 2 additions & 2 deletions kpayload/source/resolve.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ void resolve(uint64_t kernbase) {
r(mtx_init, __mtx_init);
r(mtx_lock_spin_flags, __mtx_lock_spin_flags);
r(mtx_unlock_spin_flags, __mtx_unlock_spin_flags);
r(mtx_lock_sleep, __mtx_lock_sleep);
r(mtx_unlock_sleep, __mtx_unlock_sleep);
r(mtx_lock_flags, __mtx_lock_flags);
r(mtx_unlock_flags, __mtx_unlock_flags);
r(fpu_kern_enter, __fpu_kern_enter);
r(fpu_kern_leave, __fpu_kern_leave);
r(kern_reboot, __kern_reboot);
Expand Down
4 changes: 2 additions & 2 deletions kpayload/source/uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ void init_uart() {
int uprintf(const char *fmt, ...) {
va_list va;

mtx_lock_sleep(&uart_mtx, 0);
mtx_lock_flags(&uart_mtx, 0);

va_start(va, fmt);
int r = vprintf(fmt, va);
va_end(va);

printf("\n");

mtx_unlock_sleep(&uart_mtx, 0);
mtx_unlock_flags(&uart_mtx, 0);

return r;
}

0 comments on commit 87904b9

Please sign in to comment.