# HG changeset patch # User anatofuz # Date 1594105538 -32400 # Node ID 4a4950e400b8b73db84ed4b1c05fc36ae7736dc7 # Parent bbca1e5fb946997fff9f325ff64e1174d5f853c3 ... diff -r bbca1e5fb946 -r 4a4950e400b8 src/CMakeLists.txt --- a/src/CMakeLists.txt Tue Jul 07 15:52:29 2020 +0900 +++ b/src/CMakeLists.txt Tue Jul 07 16:05:38 2020 +0900 @@ -129,7 +129,7 @@ string.c arm.c asm.S bio.c buddy.c console.cbc exec.c file.cbc fs.c log.c main.c memide.c pipe.cbc proc.cbc spinlock.cbc start.c swtch.S syscall.cbc sysfile.cbc sysproc.c trap_asm.S trap.cbc vm.c device/picirq.c device/timer.c device/uart.c SingleLinkedStack.cbc entry.S impl/vm_impl.cbc impl/vm_impl_private.cbc - impl/fs_impl.cbc impl/fs_impl_private.cbc impl/KernelRetImpl.cbc impl/KernelError.cbc impl/SyscallDispatchImpl.cbc + impl/fs_impl.cbc impl/fs_impl_private.cbc impl/KernelRetImpl.cbc impl/KernelError.cbc impl/SyscallDispatchImpl.cbc impl/CbCProcImpl.cbc ) # sys_read_impl.cbc diff -r bbca1e5fb946 -r 4a4950e400b8 src/impl/CbCProcImpl.cbc --- a/src/impl/CbCProcImpl.cbc Tue Jul 07 15:52:29 2020 +0900 +++ b/src/impl/CbCProcImpl.cbc Tue Jul 07 16:05:38 2020 +0900 @@ -77,6 +77,14 @@ goto cbc_sched(cbc_sleep1, next); } +__code sleepCbCProcImpl_stub(struct Context* cbc_context) { + CbCProcImpl* cbc_proc = (CbCProcImpl*)GearImpl(cbc_context, CbCProc, cbc_proc); + struct spinlock* lk = Gearef(cbc_context, CbCProc)->lk; + enum Code next = Gearef(cbc_context, CbCProc)->next; + goto sleepCbCProcImpl(cbc_context, cbc_proc, lk, next); +} + + __code sleep1CbCProcImpl(struct CbCProcImpl* cbc_proc, __code next1(...)) { struct spinlock *lk = proc->lk; // Tidy up. diff -r bbca1e5fb946 -r 4a4950e400b8 src/interface/CbCProc.h --- a/src/interface/CbCProc.h Tue Jul 07 15:52:29 2020 +0900 +++ b/src/interface/CbCProc.h Tue Jul 07 16:05:38 2020 +0900 @@ -5,4 +5,5 @@ __code wakeup(Impl* cbc_proc, void* chan, __code next1(...)); __code wakeup1(Impl* cbc_proc, void* chan, __code next(...)); __code next(....); + __code next1(...); } CbCProc;