this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #525 from jamesu/master_pthread_fix

32bit Syscall fix

authored by

Andrew Hyatt and committed by
GitHub
d09999a5 a567e86c

+29 -14
+10 -3
src/kernel/emulation/linux/mach/darling_mach_syscall.S
··· 43 43 44 44 #define copy_arg(off) \ 45 45 movl 8+off(%esp), %ecx ;\ 46 - movl %ecx, -32+off(%esp) 46 + movl %ecx, -56+off(%esp) 47 47 48 48 __darling_mach_syscall: 49 49 cmpl $0, %eax ··· 70 70 copy_arg(20) 71 71 copy_arg(24) 72 72 copy_arg(28) 73 - subl $32, %esp 73 + copy_arg(32) 74 + copy_arg(36) 75 + copy_arg(40) 76 + copy_arg(44) 77 + copy_arg(48) 78 + copy_arg(52) 79 + 80 + subl $56, %esp 74 81 call *%eax 75 - addl $32, %esp 82 + addl $56, %esp 76 83 .std_ret: 77 84 Lexit_hook: 78 85 .space 6, 0x90
+7 -6
src/kernel/emulation/linux/psynch/psynch_cvwait.c
··· 6 6 #include "../../../../lkm/api.h" 7 7 #include "../simple.h" 8 8 9 - long sys_psynch_cvwait(void* cv, uint32_t cvgen, uint32_t cvugen, void* mutex, uint64_t mgen, 10 - uint32_t ugen, uint64_t sec, uint32_t usec) 9 + 10 + long sys_psynch_cvwait(void* cv, uint64_t cvlsgen, uint32_t cvugen, void * mutex, uint64_t mugen, 11 + uint32_t flags, int64_t sec, uint32_t nsec) 11 12 { 12 13 struct psynch_cvwait_args args = { 13 14 .cv = cv, 14 - .cvlsgen = cvgen, 15 + .cvlsgen = cvlsgen, 15 16 .cvugen = cvugen, 16 17 .mutex = mutex, 17 - .mugen = mgen, 18 - .flags = ugen, 18 + .mugen = mugen, 19 + .flags = flags, 19 20 .sec = sec, 20 - .nsec = usec, 21 + .nsec = nsec, 21 22 }; 22 23 23 24 // __simple_printf("sys_psynch_mutexwait(mutex=%p, mgen=%x)\n", mutex, mgen);
+1 -2
src/kernel/emulation/linux/psynch/psynch_cvwait.h
··· 2 2 #define LINUX_PSYNCH_CVWAIT_H 3 3 #include <stdint.h> 4 4 5 - long sys_psynch_cvwait(void* cv, uint32_t cvgen, uint32_t cvugen, void* mutex, uint64_t mgen, 6 - uint32_t ugen, uint64_t sec, uint32_t usec); 5 + long sys_psynch_cvwait(void* cv, uint64_t cvlsgen, uint32_t cvugen, void * mutex, uint64_t mugen, uint32_t flags, int64_t sec, uint32_t nsec); 7 6 8 7 #endif 9 8
+11 -3
src/kernel/emulation/linux/syscalls-table.S
··· 39 39 40 40 #define copy_arg(off) \ 41 41 movl 8+off(%esp), %ecx ;\ 42 - movl %ecx, -24+off(%esp) 42 + movl %ecx, -56+off(%esp) 43 43 44 44 __darling_bsd_syscall: 45 45 Lentry_hook: ··· 60 60 copy_arg(12) 61 61 copy_arg(16) 62 62 copy_arg(20) 63 - subl $24, %esp 63 + copy_arg(24) 64 + copy_arg(28) 65 + copy_arg(32) 66 + copy_arg(36) 67 + copy_arg(40) 68 + copy_arg(44) 69 + copy_arg(48) 70 + copy_arg(52) 71 + subl $56, %esp 64 72 call *%eax 65 - addl $24, %esp 73 + addl $56, %esp 66 74 .std_ret: 67 75 Lexit_hook: 68 76 .space 6, 0x90