LEFT | RIGHT |
(no file at all) | |
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 #include "runtime.h" | 5 #include "runtime.h" |
6 #include "defs_GOOS_GOARCH.h" | 6 #include "defs_GOOS_GOARCH.h" |
7 #include "os_GOOS.h" | 7 #include "os_GOOS.h" |
8 #include "../../cmd/ld/textflag.h" | 8 #include "textflag.h" |
9 | 9 |
10 #define AT_NULL 0 | 10 #define AT_NULL 0 |
11 #define AT_PLATFORM 15 // introduced in at least 2.6.11 | 11 #define AT_PLATFORM 15 // introduced in at least 2.6.11 |
12 #define AT_HWCAP 16 // introduced in at least 2.6.11 | 12 #define AT_HWCAP 16 // introduced in at least 2.6.11 |
13 #define AT_RANDOM 25 // introduced in 2.6.29 | 13 #define AT_RANDOM 25 // introduced in 2.6.29 |
14 #define HWCAP_VFP (1 << 6) // introduced in at least 2.6.11 | 14 #define HWCAP_VFP (1 << 6) // introduced in at least 2.6.11 |
15 #define HWCAP_VFPv3 (1 << 13) // introduced in 2.6.30 | 15 #define HWCAP_VFPv3 (1 << 13) // introduced in 2.6.30 |
16 static uint32 runtime·randomNumber; | 16 static uint32 runtime·randomNumber; |
17 uint8 runtime·armArch = 6; // we default to ARMv6 | 17 uint8 runtime·armArch = 6; // we default to ARMv6 |
18 uint32 runtime·hwcap; // set by setup_auxv | 18 uint32 runtime·hwcap; // set by setup_auxv |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 | 71 |
72 #pragma textflag NOSPLIT | 72 #pragma textflag NOSPLIT |
73 int64 | 73 int64 |
74 runtime·cputicks(void) | 74 runtime·cputicks(void) |
75 { | 75 { |
76 // Currently cputicks() is used in blocking profiler and to seed runtime
·fastrand1(). | 76 // Currently cputicks() is used in blocking profiler and to seed runtime
·fastrand1(). |
77 // runtime·nanotime() is a poor approximation of CPU ticks that is enoug
h for the profiler. | 77 // runtime·nanotime() is a poor approximation of CPU ticks that is enoug
h for the profiler. |
78 // runtime·randomNumber provides better seeding of fastrand1. | 78 // runtime·randomNumber provides better seeding of fastrand1. |
79 return runtime·nanotime() + runtime·randomNumber; | 79 return runtime·nanotime() + runtime·randomNumber; |
80 } | 80 } |
LEFT | RIGHT |