From 47b430368cbc7c56a1779236a1db5a8dfa45a589 Mon Sep 17 00:00:00 2001 From: hyg Date: Mon, 25 Jun 2018 16:20:29 +0800 Subject: [PATCH] two typoes --- ch3-asm/ch3-04-func.md | 2 +- ch3-asm/ch3-07-goroutine-id.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ch3-asm/ch3-04-func.md b/ch3-asm/ch3-04-func.md index 9c52767..69d7ba0 100644 --- a/ch3-asm/ch3-04-func.md +++ b/ch3-asm/ch3-04-func.md @@ -77,7 +77,7 @@ TEXT ·Foo(SB), $0 RET ``` -如果是参数和返回值类型比较复杂的情况改如何处理呢?下面我们再尝试一个更复杂的函数参数和返回值的计算。比如有以下一个函数: +如果是参数和返回值类型比较复杂的情况该如何处理呢?下面我们再尝试一个更复杂的函数参数和返回值的计算。比如有以下一个函数: ```go func SomeFunc(a, b int, c bool) (d float64, err error) int diff --git a/ch3-asm/ch3-07-goroutine-id.md b/ch3-asm/ch3-07-goroutine-id.md index b6b0303..70eaac5 100644 --- a/ch3-asm/ch3-07-goroutine-id.md +++ b/ch3-asm/ch3-07-goroutine-id.md @@ -1,6 +1,6 @@ # 3.7. 例子:Goroutine ID -在操作系统中,每个进程都会有一个唯一的进程编号,每个线程也有自己唯一的线程编号。同样在Go语言中,每个Goroutine也有自己唯一的Go程编号,这个编号在panic等场景下经常遇到。虽然Goroutine有内在的编号,但是Go语言却刻意没有提供获取改编号的接口。本节我们尝试通过Go汇编语言获取Goroutine ID。 +在操作系统中,每个进程都会有一个唯一的进程编号,每个线程也有自己唯一的线程编号。同样在Go语言中,每个Goroutine也有自己唯一的Go程编号,这个编号在panic等场景下经常遇到。虽然Goroutine有内在的编号,但是Go语言却刻意没有提供获取该编号的接口。本节我们尝试通过Go汇编语言获取Goroutine ID。 ## 故意设计没有goid