74 s_flock.l_pid = getpid();
88 s_flock.l_type = F_RDLCK;
89 fd = open(
name, O_RDONLY);
92 s_flock.l_type = F_WRLCK;
93 fd = open(
name, O_RDWR | O_CREAT, 0666);
98 while (fcntl(fd, F_SETLKW, &s_flock) && errno ==
EINTR)
110 else if (mode == 0) {
113 if (fstat(fd, &st) < 0) {
130 else if (mode <= 0) {
176 if (magic == expected)
178 magic = (magic >> 16) | (magic << 16);
179 magic = ((magic & 0xff00ff) << 8) | ((magic >> 8) & 0xff00ff);
180 if (magic == expected) {
261 gcov_write_counter(gcov_type
value)
281 unsigned int alloc = 0;
286 alloc = (
length + 4) >> 2;
363 gcov_write_counter(csum->
sum_all);
364 gcov_write_counter(csum->
run_max);
365 gcov_write_counter(csum->
sum_max);
382 if (excess < words) {
530 return status.st_mtime;
void * memcpy(void *dest, const void *src, size_t n)
void * memmove(void *dest, const void *src, size_t n)
static void setbuf(FILE *stream, char *buf)
static long ftell(FILE *stream)
static size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream)
static int fclose(FILE *stream)
static size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream)
static int fseek(FILE *stream, long offset, int whence)
static FILE * fopen(const char *path, const char *mode)
static const gcov_unsigned_t * gcov_read_words(unsigned int)
GCOV_LINKAGE void gcov_write_length(gcov_position_t position)
GCOV_LINKAGE void gcov_sync(gcov_position_t base, gcov_unsigned_t length)
GCOV_LINKAGE void gcov_write_unsigned(gcov_unsigned_t value)
static gcov_unsigned_t * gcov_write_words(unsigned int)
GCOV_LINKAGE gcov_position_t gcov_write_tag(gcov_unsigned_t tag)
static void gcov_write_block(unsigned int)
GCOV_LINKAGE const char * gcov_read_string(void)
static void gcov_allocate(unsigned int)
static gcov_unsigned_t from_file(gcov_unsigned_t value)
GCOV_LINKAGE gcov_type gcov_read_counter(void)
GCOV_LINKAGE int gcov_open(const char *name, int mode)
GCOV_LINKAGE int gcov_magic(gcov_unsigned_t magic, gcov_unsigned_t expected)
GCOV_LINKAGE void gcov_write_string(const char *string)
GCOV_LINKAGE gcov_unsigned_t gcov_read_unsigned(void)
GCOV_LINKAGE int gcov_close(void)
GCOV_LINKAGE void gcov_read_summary(struct gcov_summary *summary)
unsigned int gcov_position_t
unsigned int gcov_unsigned_t
#define GCOV_TAG_SUMMARY_LENGTH
#define GCOV_COUNTERS_SUMMABLE
u8 buffer[C2P_BUFFER_MAXSIZE]
size_t strlen(const char *src)
struct gcov_ctr_summary ctrs[GCOV_COUNTERS_SUMMABLE]