This file is indexed.

/usr/include/xenomai/native/misc.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
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
/**
 * @file
 * This file is part of the Xenomai project.
 *
 * @note Copyright (C) 2005 Philippe Gerum <rpm@xenomai.org>
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */

#ifndef _XENO_MISC_H
#define _XENO_MISC_H

#include <native/types.h>

#define IORN_IOPORT	0x1
#define IORN_IOMEM	0x2

typedef struct rt_ioregion_placeholder {
	xnhandle_t opaque;
} RT_IOREGION_PLACEHOLDER;

#if defined(__KERNEL__) || defined(__XENO_SIM__)

#include <native/ppd.h>

#define XENO_IOREGION_MAGIC 0x55550b0b

typedef struct rt_ioregion {

	unsigned magic;		/* !< Magic code - must be first */

	xnhandle_t handle;	/* !< Handle in registry -- must be registered. */

	uint64_t start;		/* !< Start of I/O region. */

	uint64_t len;		/* !< Length of I/O region. */

	char name[XNOBJECT_NAME_LEN]; /* !< Symbolic name. */

	int flags;		/* !< Operation flags. */

	pid_t cpid;		/* !< Creator's pid. */

	xnholder_t rlink;	/* !< Link in resource queue. */

#define rlink2ioregion(ln)	container_of(ln, RT_IOREGION, rlink)

	xnqueue_t *rqueue;     /* !< Backpointer to resource queue. */

} RT_IOREGION;

int rt_ioregion_delete(RT_IOREGION *iorn);

static inline void __native_ioregion_flush_rq(xnqueue_t *rq)
{
#ifdef CONFIG_XENO_OPT_PERVASIVE
	xeno_flush_rq(RT_IOREGION, rq, ioregion);
#endif
}

static inline int __native_misc_pkg_init(void)
{
	return 0;
}

static inline void __native_misc_pkg_cleanup(void)
{
#ifdef CONFIG_XENO_OPT_PERVASIVE
	__native_ioregion_flush_rq(&__native_global_rholder.ioregionq);
#endif
}

#else /* !(__KERNEL__ && __XENO_SIM__) */

typedef RT_IOREGION_PLACEHOLDER RT_IOREGION;

#ifdef __cplusplus
extern "C" {
#endif

/* Public interface. */

int rt_io_get_region(RT_IOREGION *iorn,
		     const char *name,
		     uint64_t start,
		     uint64_t len,
		     int flags);

int rt_io_put_region(RT_IOREGION *iorn);

#ifdef __cplusplus
}
#endif

#endif /* !(__KERNEL__ || __XENO_SIM__) */

#endif /* !_XENO_MISC_H */