Mercurial > hg > CbC > CbC_xv6
changeset 375:4a4950e400b8
...
author | anatofuz |
---|---|
date | Tue, 07 Jul 2020 16:05:38 +0900 |
parents | bbca1e5fb946 |
children | 718e7398b2c3 |
files | src/CMakeLists.txt src/impl/CbCProcImpl.cbc src/interface/CbCProc.h |
diffstat | 3 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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.
--- 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;