This file is indexed.

/usr/include/xenomai/vxworks/ppd.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
/**
 * @file
 * This file is part of the Xenomai project.
 *
 * @note Copyright (C) 2007 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 _VXWORKS_PPD_H
#define _VXWORKS_PPD_H

#include <nucleus/pod.h>
#include <nucleus/ppd.h>

#ifndef CONFIG_XENO_OPT_DEBUG_VXWORKS
#define CONFIG_XENO_OPT_DEBUG_VXWORKS  0
#endif

typedef struct wind_resource_holder {

	xnshadow_ppd_t ppd;

#define ppd2rholder(a)	container_of(a, struct wind_resource_holder, ppd)

	xnqueue_t wdq;		/* Watchdogs created by the process. */

	int wdcount;		/* Number of watchdogs created */
	xnsynch_t wdsynch;	/* Per-process synch for watchdog server task. */
	xnqueue_t wdpending;	/* Elapsed watchdogs to notify to user-space. */

	xnqueue_t msgQq;	/* Msg queues created by the process. */
	xnqueue_t semq;		/* Semaphores created by the process. */

} wind_rholder_t;

extern wind_rholder_t __wind_global_rholder;

#ifdef CONFIG_XENO_OPT_PERVASIVE

extern int __wind_muxid;

static inline wind_rholder_t *wind_get_rholder(void)
{
	xnshadow_ppd_t *ppd = xnshadow_ppd_get(__wind_muxid);

	if (ppd == NULL)
		return &__wind_global_rholder;

	return ppd2rholder(ppd);
}

#else /* !CONFIG_XENO_OPT_PERVASIVE */

static inline wind_rholder_t *wind_get_rholder(void)
{
	return &__wind_global_rholder;
}

#endif /* !CONFIG_XENO_OPT_PERVASIVE */

#if XENO_DEBUG(VXWORKS)
#define __wind_trace_release(__name, __obj, __err)			\
	xnprintf("VxWorks: cleaning up %s \"%s\" (ret=%d).\n",		\
		 __name, (__obj)->name, __err)
#else /* !XENO_DEBUG(VXWORKS) */
#define __wind_trace_release(__name, __obj, __err)
#endif /* !XENO_DEBUG(VXWORKS) */

#define wind_flush_rq(__type, __rq, __name)				\
	do {								\
		STATUS __name##Delete(__natural_word_type id);		\
		xnholder_t *holder, *nholder;				\
		__type *obj;						\
		STATUS err;						\
		spl_t s;						\
		xnlock_get_irqsave(&nklock, s);				\
		nholder = getheadq(__rq);				\
		while ((holder = nholder) != NULL) {			\
			nholder = nextq((__rq), holder);		\
			xnlock_put_irqrestore(&nklock, s);		\
			obj = rlink2##__name(holder);			\
			err = __name##Delete((__natural_word_type)obj);	\
			__wind_trace_release(#__name, obj, err);	\
			xnlock_get_irqsave(&nklock, s);			\
			if (unlikely(err) &&				\
			    (obj->rqueue != &__wind_global_rholder.__name##q)) { \
				removeq(obj->rqueue, holder);		\
				appendq(&__wind_global_rholder.__name##q, holder); \
				obj->rqueue = &__wind_global_rholder.__name##q; \
			}						\
		}							\
		xnlock_put_irqrestore(&nklock, s);			\
	} while(0)

#endif /* !_VXWORKS_PPD_H */