This file is indexed.

/usr/include/xenomai/asm-sh/bits/bind.h is in libxenomai-dev 2.6.4+dfsg-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#ifndef _XENO_ASM_SH_BIND_H
#define _XENO_ASM_SH_BIND_H

#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <unistd.h>
#include <limits.h>

#include <asm-generic/xenomai/bind.h>

struct xnarch_tsc_area;

volatile struct xnarch_tsc_area *xeno_sh_tsc = NULL;

volatile unsigned long *xeno_sh_tcnt = NULL;

static volatile void *__xeno_kmem_map(unsigned long pa, unsigned int pagesz)
{
	void *p;
	int fd;

	fd = open("/dev/mem", O_RDWR | O_SYNC);
	if (fd == -1) {
		perror("Xenomai init: open(/dev/mem)");
		exit(EXIT_FAILURE);
	}

	p = mmap(NULL, pagesz, PROT_READ | PROT_WRITE, MAP_SHARED, fd, pa & ~(pagesz - 1));
	if (p == MAP_FAILED) {
		perror("Xenomai init: mmap(/dev/mem)");
		exit(EXIT_FAILURE);
	}
	close(fd);

	return (volatile void *)(p + (pa & (pagesz - 1)));
}

static inline void xeno_sh_features_check(struct xnfeatinfo *finfo)
{
	unsigned int pagesz = sysconf(_SC_PAGESIZE);
	xeno_sh_tsc = __xeno_kmem_map(finfo->feat_arch.hrclock_membase, pagesz);
	xeno_sh_tcnt = __xeno_kmem_map(xeno_sh_tsc->counter_pa, pagesz);
}

#define xeno_arch_features_check(finfo) xeno_sh_features_check(finfo)

#endif /* _XENO_ASM_SH_BIND_H */