FreeRDP
cpu-features.c File Reference
#include "cpu-features.h"
#include <dlfcn.h>
#include <errno.h>
#include <fcntl.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/system_properties.h>
#include <unistd.h>
#include <winpr/wtypes.h>
#include <winpr/debug.h>

Macros

#define D(...)
 

Functions

static int get_file_size (const char *pathname)
 
static int read_file (const char *pathname, char *buffer, size_t buffsize)
 
static const char * parse_number (const char *input, const char *limit, int base, int *result)
 
static const char * parse_decimal (const char *input, const char *limit, int *result)
 
static __inline__ void cpulist_init (CpuList *list)
 
static __inline__ void cpulist_and (CpuList *list1, CpuList *list2)
 
static __inline__ void cpulist_set (CpuList *list, int index)
 
static __inline__ int cpulist_count (CpuList *list)
 
static void cpulist_parse (CpuList *list, const char *line, int line_len)
 
static void cpulist_read_from (CpuList *list, const char *filename)
 
static int get_cpu_count (void)
 
static void android_cpuInitFamily (void)
 
static void android_cpuInit (void)
 
AndroidCpuFamily android_getCpuFamily (void)
 
uint64_t android_getCpuFeatures (void)
 
int android_getCpuCount (void)
 
static void android_cpuInitDummy (void)
 
int android_setCpu (int cpu_count, uint64_t cpu_features)
 

Variables

static pthread_once_t g_once
 
static int g_inited
 
static AndroidCpuFamily g_cpuFamily
 
static uint64_t g_cpuFeatures
 
static int g_cpuCount
 
static const int android_cpufeatures_debug = 0
 

Macro Definition Documentation

◆ D

#define D (   ...)
Value:
do \
{ \
{ \
printf(__VA_ARGS__); \
fflush(stdout); \
} \
} while (0)
static const int android_cpufeatures_debug
Definition: cpu-features.c:88

Function Documentation

◆ android_cpuInit()

static void android_cpuInit ( void  )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ android_cpuInitDummy()

static void android_cpuInitDummy ( void  )
static
Here is the caller graph for this function:

◆ android_cpuInitFamily()

static void android_cpuInitFamily ( void  )
static
Here is the caller graph for this function:

◆ android_getCpuCount()

int android_getCpuCount ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ android_getCpuFamily()

AndroidCpuFamily android_getCpuFamily ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ android_getCpuFeatures()

uint64_t android_getCpuFeatures ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ android_setCpu()

int android_setCpu ( int  cpu_count,
uint64_t  cpu_features 
)
Here is the call graph for this function:

◆ cpulist_and()

static __inline__ void cpulist_and ( CpuList *  list1,
CpuList *  list2 
)
static
Here is the caller graph for this function:

◆ cpulist_count()

static __inline__ int cpulist_count ( CpuList *  list)
static
Here is the caller graph for this function:

◆ cpulist_init()

static __inline__ void cpulist_init ( CpuList *  list)
static
Here is the caller graph for this function:

◆ cpulist_parse()

static void cpulist_parse ( CpuList *  list,
const char *  line,
int  line_len 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cpulist_read_from()

static void cpulist_read_from ( CpuList *  list,
const char *  filename 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cpulist_set()

static __inline__ void cpulist_set ( CpuList *  list,
int  index 
)
static
Here is the caller graph for this function:

◆ get_cpu_count()

static int get_cpu_count ( void  )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_file_size()

static int get_file_size ( const char *  pathname)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parse_decimal()

static const char* parse_decimal ( const char *  input,
const char *  limit,
int *  result 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parse_number()

static const char* parse_number ( const char *  input,
const char *  limit,
int  base,
int *  result 
)
static
Here is the caller graph for this function:

◆ read_file()

static int read_file ( const char *  pathname,
char *  buffer,
size_t  buffsize 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ android_cpufeatures_debug

const int android_cpufeatures_debug = 0
static

◆ g_cpuCount

int g_cpuCount
static

◆ g_cpuFamily

AndroidCpuFamily g_cpuFamily
static

◆ g_cpuFeatures

uint64_t g_cpuFeatures
static

◆ g_inited

int g_inited
static

◆ g_once

pthread_once_t g_once
static