Russ Cox | e9d62a6 | 2013-03-14 11:35:13 -0700 | [diff] [blame] | 1 | // Copyright 2009 The Go Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
| 5 | #include "runtime.h" |
| 6 | #include "defs_GOOS_GOARCH.h" |
| 7 | #include "os_GOOS.h" |
| 8 | |
| 9 | void |
| 10 | runtime·lwp_mcontext_init(McontextT *mc, void *stack, M *mp, G *gp, void (*fn)(void)) |
| 11 | { |
| 12 | mc->__gregs[REG_EIP] = (uint32)runtime·lwp_tramp; |
| 13 | mc->__gregs[REG_UESP] = (uint32)stack; |
| 14 | mc->__gregs[REG_EBX] = (uint32)mp; |
| 15 | mc->__gregs[REG_EDX] = (uint32)gp; |
| 16 | mc->__gregs[REG_ESI] = (uint32)fn; |
| 17 | } |