mirror of
https://github.com/dart-lang/sdk
synced 2024-11-05 18:22:09 +00:00
e060b66a3e
Split directory_posix -> directory_(android|linux|macos) This allows us to cleanly make Android-specific changes to directory_android.cc Copy all _linux files to _android files and edit as needed to account for the differences between Linux and Android: + getcwd(0, NULL) doesn't work on Android, have to emulate + Android doesn't have a '/tmp' directory, have to emulate + Android doesn't provide mkdtemp(), have to emulate. + Small differences in the available system include files. + Use pthread_cond_timedwait_monotonic instead of pthread_condattr_setclock Review URL: https://chromiumcodereview.appspot.com//10826233 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10613 260f80e4-7a28-3924-810f-c04153c831b5
22 lines
588 B
C++
22 lines
588 B
C++
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
#ifndef PLATFORM_UTILS_ANDROID_H_
|
|
#define PLATFORM_UTILS_ANDROID_H_
|
|
|
|
namespace dart {
|
|
|
|
inline int Utils::CountTrailingZeros(uword x) {
|
|
#if defined(ARCH_IS_32_BIT)
|
|
return __builtin_ctzl(x);
|
|
#elif defined(ARCH_IS_64_BIT)
|
|
return __builtin_ctzll(x);
|
|
#else
|
|
#error Architecture is not 32-bit or 64-bit.
|
|
#endif
|
|
};
|
|
|
|
} // namespace dart
|
|
|
|
#endif // PLATFORM_UTILS_ANDROID_H_
|