chromium/third_party/cpuinfo/src/src/linux/cpulist.c

#include <errno.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>

#include <fcntl.h>
#include <sched.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>

#if CPUINFO_MOCK
#include <cpuinfo-mock.h>
#endif
#include <cpuinfo/log.h>
#include <linux/api.h>

/*
 * Size, in chars, of the on-stack buffer used for parsing cpu lists.
 * This is also the limit on the length of a single entry
 * (<cpu-number> or <cpu-number-start>-<cpu-number-end>)
 * in the cpu list.
 */
#define BUFFER_SIZE

/* Locale-independent */
inline static bool is_whitespace(char c) {}

inline static const char* parse_number(const char* string, const char* end, uint32_t number_ptr[restrict static 1]) {}

inline static bool parse_entry(
	const char* entry_start,
	const char* entry_end,
	cpuinfo_cpulist_callback callback,
	void* context) {}

bool cpuinfo_linux_parse_cpulist(const char* filename, cpuinfo_cpulist_callback callback, void* context) {}