Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(18)

Side by Side Diff: src/pkg/runtime/linux/386/sys.s

Issue 4711045: code review 4711045: runtime: improve Linux mutex (Closed)
Patch Set: diff -r c162ec4be385 https://go.googlecode.com/hg/ Created 13 years, 7 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/pkg/runtime/linux/386/defs.h ('k') | src/pkg/runtime/linux/amd64/defs.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 The Go Authors. All rights reserved. 1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 // 5 //
6 // System calls and other sys.stuff for 386, Linux 6 // System calls and other sys.stuff for 386, Linux
7 // 7 //
8 8
9 #include "386/asm.h" 9 #include "386/asm.h"
10 10
11 TEXT runtime·exit(SB),7,$0 11 TEXT runtime·exit(SB),7,$0
12 MOVL $252, AX // syscall number 12 MOVL $252, AX // syscall number
13 MOVL 4(SP), BX 13 MOVL 4(SP), BX
14 INT $0x80 14 INT $0x80
15 INT $3 // not reached 15 INT $3 // not reached
16 RET 16 RET
17 17
18 TEXT runtime·exit1(SB),7,$0 18 TEXT runtime·exit1(SB),7,$0
19 MOVL $1, AX // exit - exit the current os thread 19 MOVL $1, AX // exit - exit the current os thread
20 MOVL 4(SP), BX 20 MOVL 4(SP), BX
21 INT $0x80 21 INT $0x80
22 INT $3 // not reached 22 INT $3 // not reached
23 RET 23 RET
24 24
25 TEXT runtime·open(SB),7,$0
26 MOVL $5, AX // syscall - open
27 MOVL 4(SP), BX
28 MOVL 8(SP), CX
29 MOVL 12(SP), DX
30 INT $0x80
31 RET
32
33 TEXT runtime·close(SB),7,$0
34 MOVL $6, AX // syscall - close
35 MOVL 4(SP), BX
36 INT $0x80
37 RET
38
25 TEXT runtime·write(SB),7,$0 39 TEXT runtime·write(SB),7,$0
26 MOVL $4, AX // syscall - write 40 MOVL $4, AX // syscall - write
27 » MOVL» 4(SP), BX 41 » MOVL» 4(SP), BX
28 MOVL 8(SP), CX 42 MOVL 8(SP), CX
29 MOVL 12(SP), DX 43 MOVL 12(SP), DX
30 INT $0x80 44 INT $0x80
45 RET
46
47 TEXT runtime·read(SB),7,$0
48 MOVL $3, AX // syscall - read
49 MOVL 4(SP), BX
50 MOVL 8(SP), CX
51 MOVL 12(SP), DX
52 INT $0x80
31 RET 53 RET
32 54
33 TEXT runtime·raisesigpipe(SB),7,$12 55 TEXT runtime·raisesigpipe(SB),7,$12
34 MOVL $224, AX // syscall - gettid 56 MOVL $224, AX // syscall - gettid
35 INT $0x80 57 INT $0x80
36 MOVL AX, 0(SP) // arg 1 tid 58 MOVL AX, 0(SP) // arg 1 tid
37 MOVL $13, 4(SP) // arg 2 SIGPIPE 59 MOVL $13, 4(SP) // arg 2 SIGPIPE
38 MOVL $238, AX // syscall - tkill 60 MOVL $238, AX // syscall - tkill
39 INT $0x80 61 INT $0x80
40 RET 62 RET
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 JLS 2(PC) 330 JLS 2(PC)
309 INT $3 331 INT $3
310 332
311 // compute segment selector - (entry*8+7) 333 // compute segment selector - (entry*8+7)
312 MOVL entry+0(FP), AX 334 MOVL entry+0(FP), AX
313 SHLL $3, AX 335 SHLL $3, AX
314 ADDL $7, AX 336 ADDL $7, AX
315 MOVW AX, GS 337 MOVW AX, GS
316 338
317 RET 339 RET
340
341 TEXT runtime·osyield(SB),7,$0
342 MOVL $158, AX
343 INT $0x80
344 RET
OLDNEW
« no previous file with comments | « src/pkg/runtime/linux/386/defs.h ('k') | src/pkg/runtime/linux/amd64/defs.h » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b