1
0
mirror of https://github.com/google/cpu_features.git synced 2025-07-01 05:11:15 +02:00

Use CPU_FEATURES_ prefix for namespace macros.

This commit is contained in:
Guillaume Chatelet
2018-02-12 16:15:15 +01:00
parent 8bace7000c
commit e419573d10
12 changed files with 26 additions and 26 deletions

View File

@ -20,7 +20,7 @@
#include <stdint.h>
#include "cpu_features_macros.h"
START_CPP_NAMESPACE
CPU_FEATURES_START_CPP_NAMESPACE
inline static bool IsBitSet(uint32_t reg, uint32_t bit) {
return (reg >> bit) & 0x1;
@ -34,6 +34,6 @@ inline static uint32_t ExtractBitRange(uint32_t reg, uint32_t msb,
return (reg >> lsb) & mask;
}
END_CPP_NAMESPACE
CPU_FEATURES_END_CPP_NAMESPACE
#endif // CPU_FEATURES_INCLUDE_INTERNAL_BIT_UTILS_H_

View File

@ -19,7 +19,7 @@
#include "cpu_features_macros.h"
START_CPP_NAMESPACE
CPU_FEATURES_START_CPP_NAMESPACE
// A struct to hold the result of a call to cpuid.
typedef struct {
@ -32,6 +32,6 @@ Leaf CpuId(uint32_t leaf_id);
// Returns the eax value of the XCR0 register.
uint32_t GetXCR0Eax(void);
END_CPP_NAMESPACE
CPU_FEATURES_END_CPP_NAMESPACE
#endif // CPU_FEATURES_INCLUDE_INTERNAL_CPUID_X86_H_

View File

@ -21,7 +21,7 @@
#include <stdint.h>
#include "cpu_features_macros.h"
START_CPP_NAMESPACE
CPU_FEATURES_START_CPP_NAMESPACE
// Same as linux "open(filename, O_RDONLY)", retries automatically on EINTR.
int OpenFile(const char* filename);
@ -33,6 +33,6 @@ int ReadFile(int file_descriptor, void* buffer, size_t buffer_size);
// Same as linux "close(file_descriptor)".
void CloseFile(int file_descriptor);
END_CPP_NAMESPACE
CPU_FEATURES_END_CPP_NAMESPACE
#endif // CPU_FEATURES_INCLUDE_INTERNAL_FILESYSTEM_H_

View File

@ -20,7 +20,7 @@
#include <stdint.h>
#include "cpu_features_macros.h"
START_CPP_NAMESPACE
CPU_FEATURES_START_CPP_NAMESPACE
// To avoid depending on the linux kernel we reproduce the architecture specific
// constants here.
@ -68,6 +68,6 @@ typedef struct {
HardwareCapabilities GetHardwareCapabilities(void);
END_CPP_NAMESPACE
CPU_FEATURES_END_CPP_NAMESPACE
#endif // CPU_FEATURES_INCLUDE_INTERNAL_HWCAPS_H_

View File

@ -24,7 +24,7 @@
#include "internal/hwcaps.h"
#include "internal/string_view.h"
START_CPP_NAMESPACE
CPU_FEATURES_START_CPP_NAMESPACE
// Use the following macro to declare setter functions to be used in
// CapabilityConfig.
@ -54,5 +54,5 @@ void OverrideFromHwCaps(const size_t configs_size,
const HardwareCapabilities hwcaps,
void* const features);
END_CPP_NAMESPACE
CPU_FEATURES_END_CPP_NAMESPACE
#endif // CPU_FEATURES_INCLUDE_INTERNAL_LINUX_FEATURES_AGGREGATOR_H_

View File

@ -22,7 +22,7 @@
#include "cpu_features_macros.h"
#include "internal/string_view.h"
START_CPP_NAMESPACE
CPU_FEATURES_START_CPP_NAMESPACE
typedef struct {
char buffer[STACK_LINE_READER_BUFFER_SIZE];
@ -44,6 +44,6 @@ typedef struct {
// Reads the file pointed to by fd and tries to read a full line.
LineResult StackLineReader_NextLine(StackLineReader* reader);
END_CPP_NAMESPACE
CPU_FEATURES_END_CPP_NAMESPACE
#endif // CPU_FEATURES_INCLUDE_INTERNAL_STACK_LINE_READER_H_

View File

@ -21,7 +21,7 @@
#include <string.h>
#include "cpu_features_macros.h"
START_CPP_NAMESPACE
CPU_FEATURES_START_CPP_NAMESPACE
typedef struct {
const char* ptr;
@ -96,6 +96,6 @@ bool HasWord(const StringView line, const char* const word);
bool GetAttributeKeyValue(const StringView line, StringView* key,
StringView* value);
END_CPP_NAMESPACE
CPU_FEATURES_END_CPP_NAMESPACE
#endif // CPU_FEATURES_INCLUDE_INTERNAL_STRING_VIEW_H_