This file is indexed.

/usr/include/xenomai/asm-generic/bits/current.h is in libxenomai-dev 2.6.2.1-2ubuntu2.

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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#ifndef _XENO_ASM_GENERIC_CURRENT_H
#define _XENO_ASM_GENERIC_CURRENT_H

#include <pthread.h>
#include <nucleus/thread.h>

extern pthread_key_t xeno_current_mode_key;

xnhandle_t xeno_slow_get_current(void);
unsigned long xeno_slow_get_current_mode(void);
void xeno_current_warn_old(void);

#ifdef HAVE___THREAD
extern __thread __attribute__ ((tls_model ("initial-exec")))
xnhandle_t xeno_current;
extern __thread __attribute__ ((tls_model ("initial-exec")))
unsigned long *xeno_current_mode;

static inline xnhandle_t xeno_get_current(void)
{
	return xeno_current;
}

#define xeno_get_current_fast() xeno_get_current()

static inline unsigned long xeno_get_current_mode(void)
{
	return xeno_current_mode ? *xeno_current_mode : XNRELAX;
}

#else /* ! HAVE___THREAD */
extern pthread_key_t xeno_current_key;

xnhandle_t xeno_slow_get_current(void);

unsigned long xeno_slow_get_current_mode(void);

static inline xnhandle_t xeno_get_current(void)
{
	void *val = pthread_getspecific(xeno_current_key);

	return (xnhandle_t)val ?: xeno_slow_get_current();
}

/* syscall-free, but unreliable in TSD destructor context */
static inline xnhandle_t xeno_get_current_fast(void)
{
	void *val = pthread_getspecific(xeno_current_key);

	return (xnhandle_t)val ?: XN_NO_HANDLE;
}

static inline unsigned long xeno_get_current_mode(void)
{
	unsigned long *mode;

	mode = pthread_getspecific(xeno_current_mode_key);

	return mode ? *mode : XNRELAX;
}

#endif /* ! HAVE___THREAD */

void xeno_init_current_keys(void);

void xeno_set_current(void);

void xeno_set_current_mode(unsigned long offset);

#endif /* _XENO_ASM_GENERIC_CURRENT_H */