OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 76 |
77 // 0 is never a valid thread id. | 77 // 0 is never a valid thread id. |
78 static const pthread_t kNoThread = (pthread_t) 0; | 78 static const pthread_t kNoThread = (pthread_t) 0; |
79 | 79 |
80 | 80 |
81 uint64_t OS::CpuFeaturesImpliedByPlatform() { | 81 uint64_t OS::CpuFeaturesImpliedByPlatform() { |
82 #if defined(__APPLE__) | 82 #if defined(__APPLE__) |
83 // Mac OS X requires all these to install so we can assume they are present. | 83 // Mac OS X requires all these to install so we can assume they are present. |
84 // These constants are defined by the CPUid instructions. | 84 // These constants are defined by the CPUid instructions. |
85 const uint64_t one = 1; | 85 const uint64_t one = 1; |
86 return (one << SSE2) | (one << CMOV) | (one << RDTSC) | (one << CPUID); | 86 return (one << SSE2) | (one << CMOV) | (one << CPUID); |
87 #else | 87 #else |
88 return 0; // Nothing special about the other systems. | 88 return 0; // Nothing special about the other systems. |
89 #endif | 89 #endif |
90 } | 90 } |
91 | 91 |
92 | 92 |
93 // Maximum size of the virtual memory. 0 means there is no artificial | 93 // Maximum size of the virtual memory. 0 means there is no artificial |
94 // limit. | 94 // limit. |
95 | 95 |
96 intptr_t OS::MaxVirtualMemory() { | 96 intptr_t OS::MaxVirtualMemory() { |
(...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
990 return ntohl(value); | 990 return ntohl(value); |
991 } | 991 } |
992 | 992 |
993 | 993 |
994 Socket* OS::CreateSocket() { | 994 Socket* OS::CreateSocket() { |
995 return new POSIXSocket(); | 995 return new POSIXSocket(); |
996 } | 996 } |
997 | 997 |
998 | 998 |
999 } } // namespace v8::internal | 999 } } // namespace v8::internal |
OLD | NEW |