diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-10-09 22:52:54 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-10-10 09:08:23 +0200 |
commit | e599318e912d8836c59d8b5202e3e31a6b8dcae9 (patch) | |
tree | 1172b8b830a1c3236e45c834c2b80e01325ea144 /rtemsbsd/rtems | |
parent | Move files to match FreeBSD layout (diff) | |
download | rtems-libbsd-e599318e912d8836c59d8b5202e3e31a6b8dcae9.tar.bz2 |
Update files to match FreeBSD layout
Add compatibility with Newlib header files. Some FreeBSD header files
are mapped by the translation script:
o rtems/bsd/sys/_types.h
o rtems/bsd/sys/errno.h
o rtems/bsd/sys/lock.h
o rtems/bsd/sys/param.h
o rtems/bsd/sys/resource.h
o rtems/bsd/sys/time.h
o rtems/bsd/sys/timespec.h
o rtems/bsd/sys/types.h
o rtems/bsd/sys/unistd.h
It is now possible to include <sys/socket.h> directly for example.
Generate one Makefile which builds everything including tests.
Diffstat (limited to 'rtemsbsd/rtems')
47 files changed, 413 insertions, 313 deletions
diff --git a/rtemsbsd/rtems/ipsec_get_policylen.c b/rtemsbsd/rtems/ipsec_get_policylen.c index 160c5e52..c5d910ad 100644 --- a/rtemsbsd/rtems/ipsec_get_policylen.c +++ b/rtemsbsd/rtems/ipsec_get_policylen.c @@ -1,6 +1,6 @@ -#include <sys/types.h> -#include <sys/param.h> +#include <rtems/bsd/sys/types.h> +#include <rtems/bsd/sys/param.h> #include <netipsec/ipsec.h> diff --git a/rtemsbsd/rtems/kvm_private.h b/rtemsbsd/rtems/kvm_private.h index 7655511a..5b9c9b04 100644 --- a/rtemsbsd/rtems/kvm_private.h +++ b/rtemsbsd/rtems/kvm_private.h @@ -8,6 +8,6 @@ typedef struct { uintptr_t value; } kvm_symval_t; -kvm_symval_t rtems_kvm_symbols[]; +extern kvm_symval_t rtems_kvm_symbols[]; #endif diff --git a/rtemsbsd/rtems/rtems-bsd-assert.c b/rtemsbsd/rtems/rtems-bsd-assert.c index 2228fe8d..410f1026 100644 --- a/rtemsbsd/rtems/rtems-bsd-assert.c +++ b/rtemsbsd/rtems/rtems-bsd-assert.c @@ -38,10 +38,10 @@ * SUCH DAMAGE. */ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> -#include <freebsd/sys/types.h> -#include <freebsd/sys/systm.h> +#include <rtems/bsd/sys/types.h> +#include <sys/systm.h> void rtems_bsd_assert_func(const char *file, int line, const char *func, const char *expr) diff --git a/rtemsbsd/rtems/rtems-bsd-autoconf.c b/rtemsbsd/rtems/rtems-bsd-autoconf.c index 94cf5355..5febcbcc 100644 --- a/rtemsbsd/rtems/rtems-bsd-autoconf.c +++ b/rtemsbsd/rtems/rtems-bsd-autoconf.c @@ -38,13 +38,13 @@ * SUCH DAMAGE. */ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> -#include <freebsd/sys/param.h> -#include <freebsd/sys/types.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/bus.h> -#include <freebsd/sys/kernel.h> +#include <rtems/bsd/sys/param.h> +#include <rtems/bsd/sys/types.h> +#include <sys/systm.h> +#include <sys/bus.h> +#include <sys/kernel.h> static void configure_first(void *dummy) diff --git a/rtemsbsd/rtems/rtems-bsd-bus-dma-mbuf.c b/rtemsbsd/rtems/rtems-bsd-bus-dma-mbuf.c index 97e0149b..9056b489 100644 --- a/rtemsbsd/rtems/rtems-bsd-bus-dma-mbuf.c +++ b/rtemsbsd/rtems/rtems-bsd-bus-dma-mbuf.c @@ -43,10 +43,10 @@ * SUCH DAMAGE. */ -#include <freebsd/machine/rtems-bsd-config.h> -#include <freebsd/machine/rtems-bsd-bus-dma.h> +#include <machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-bus-dma.h> -#include <freebsd/sys/mbuf.h> +#include <sys/mbuf.h> /* * Like bus_dmamap_load(), but for mbufs. diff --git a/rtemsbsd/rtems/rtems-bsd-bus-dma.c b/rtemsbsd/rtems/rtems-bsd-bus-dma.c index e186e8ba..34f46eed 100644 --- a/rtemsbsd/rtems/rtems-bsd-bus-dma.c +++ b/rtemsbsd/rtems/rtems-bsd-bus-dma.c @@ -45,14 +45,14 @@ * SUCH DAMAGE. */ -#include <freebsd/machine/rtems-bsd-config.h> -#include <freebsd/machine/rtems-bsd-cache.h> -#include <freebsd/machine/rtems-bsd-bus-dma.h> +#include <machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-cache.h> +#include <machine/rtems-bsd-bus-dma.h> #include <rtems/malloc.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/machine/atomic.h> +#include <sys/malloc.h> +#include <machine/atomic.h> #ifdef CPU_DATA_CACHE_ALIGNMENT #define CLSZ ((uintptr_t) CPU_DATA_CACHE_ALIGNMENT) diff --git a/rtemsbsd/rtems/rtems-bsd-cam.c b/rtemsbsd/rtems/rtems-bsd-cam.c index 1f039412..baad15f2 100644 --- a/rtemsbsd/rtems/rtems-bsd-cam.c +++ b/rtemsbsd/rtems/rtems-bsd-cam.c @@ -38,24 +38,24 @@ * SUCH DAMAGE. */ -#include <freebsd/machine/rtems-bsd-config.h> - -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/lock.h> -#include <freebsd/sys/mutex.h> -#include <freebsd/sys/condvar.h> - -#include <freebsd/cam/cam.h> -#include <freebsd/cam/cam_ccb.h> -#include <freebsd/cam/cam_sim.h> -#include <freebsd/cam/cam_xpt.h> -#include <freebsd/cam/cam_xpt_sim.h> -#include <freebsd/cam/cam_debug.h> - -#include <freebsd/cam/scsi/scsi_all.h> +#include <machine/rtems-bsd-config.h> + +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/malloc.h> +#include <sys/kernel.h> +#include <rtems/bsd/sys/lock.h> +#include <sys/mutex.h> +#include <sys/condvar.h> + +#include <cam/cam.h> +#include <cam/cam_ccb.h> +#include <cam/cam_sim.h> +#include <cam/cam_xpt.h> +#include <cam/cam_xpt_sim.h> +#include <cam/cam_debug.h> + +#include <cam/scsi/scsi_all.h> #include <rtems/media.h> #include <rtems/libio.h> diff --git a/rtemsbsd/rtems/rtems-bsd-condvar.c b/rtemsbsd/rtems/rtems-bsd-condvar.c index cb97174d..f5022191 100644 --- a/rtemsbsd/rtems/rtems-bsd-condvar.c +++ b/rtemsbsd/rtems/rtems-bsd-condvar.c @@ -37,19 +37,19 @@ * SUCH DAMAGE. */ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> #include <rtems/score/objectimpl.h> #include <rtems/score/threaddispatch.h> #include <rtems/score/threadqimpl.h> #include <rtems/posix/condimpl.h> -#include <freebsd/sys/param.h> -#include <freebsd/sys/types.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/lock.h> -#include <freebsd/sys/mutex.h> -#include <freebsd/sys/condvar.h> +#include <rtems/bsd/sys/param.h> +#include <rtems/bsd/sys/types.h> +#include <sys/systm.h> +#include <rtems/bsd/sys/lock.h> +#include <sys/mutex.h> +#include <sys/condvar.h> RTEMS_CHAIN_DEFINE_EMPTY(rtems_bsd_condvar_chain); diff --git a/rtemsbsd/rtems/rtems-bsd-conf.c b/rtemsbsd/rtems/rtems-bsd-conf.c index cfe8e823..bb1666c2 100644 --- a/rtemsbsd/rtems/rtems-bsd-conf.c +++ b/rtemsbsd/rtems/rtems-bsd-conf.c @@ -33,14 +33,14 @@ * SUCH DAMAGE. */ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> #include <stdio.h> #include <rtems.h> __FBSDID("$FreeBSD$"); -#include <freebsd/sys/param.h> -#include <freebsd/sys/conf.h> +#include <rtems/bsd/sys/param.h> +#include <sys/conf.h> struct cdev * make_dev(struct cdevsw *devsw, int unit, uid_t uid, gid_t gid, int mode, diff --git a/rtemsbsd/rtems/rtems-bsd-copyinout.c b/rtemsbsd/rtems/rtems-bsd-copyinout.c index 334de961..3d3707a5 100644 --- a/rtemsbsd/rtems/rtems-bsd-copyinout.c +++ b/rtemsbsd/rtems/rtems-bsd-copyinout.c @@ -33,7 +33,7 @@ * SUCH DAMAGE. */ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> #include <string.h> #include <stdio.h> diff --git a/rtemsbsd/rtems/rtems-bsd-delay.c b/rtemsbsd/rtems/rtems-bsd-delay.c index e7fe9ae9..9eb34c40 100644 --- a/rtemsbsd/rtems/rtems-bsd-delay.c +++ b/rtemsbsd/rtems/rtems-bsd-delay.c @@ -38,12 +38,12 @@ * SUCH DAMAGE. */ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> -#include <freebsd/sys/param.h> -#include <freebsd/sys/types.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/kernel.h> +#include <rtems/bsd/sys/param.h> +#include <rtems/bsd/sys/types.h> +#include <sys/systm.h> +#include <sys/kernel.h> void DELAY(int usec) diff --git a/rtemsbsd/rtems/rtems-bsd-descrip.c b/rtemsbsd/rtems/rtems-bsd-descrip.c index 72539987..d0d7944e 100644 --- a/rtemsbsd/rtems/rtems-bsd-descrip.c +++ b/rtemsbsd/rtems/rtems-bsd-descrip.c @@ -32,27 +32,27 @@ * SUCH DAMAGE. */ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> -#include <freebsd/sys/conf.h> -#include <freebsd/sys/domain.h> -#include <freebsd/sys/fcntl.h> -#include <freebsd/sys/file.h> -#include <freebsd/sys/filedesc.h> -#include <freebsd/sys/filio.h> -#include <freebsd/sys/jail.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/limits.h> -#include <freebsd/sys/lock.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/mount.h> -#include <freebsd/sys/mutex.h> -#include <freebsd/sys/namei.h> -#include <freebsd/sys/priv.h> -#include <freebsd/sys/proc.h> +#include <sys/conf.h> +#include <sys/domain.h> +#include <sys/fcntl.h> +#include <sys/file.h> +#include <sys/filedesc.h> +#include <sys/filio.h> +#include <sys/jail.h> +#include <sys/kernel.h> +#include <sys/limits.h> +#include <rtems/bsd/sys/lock.h> +#include <sys/malloc.h> +#include <sys/mount.h> +#include <sys/mutex.h> +#include <sys/namei.h> +#include <sys/priv.h> +#include <sys/proc.h> /* * This routine is not supported in the RTEMS interface diff --git a/rtemsbsd/rtems/rtems-bsd-generic.c b/rtemsbsd/rtems/rtems-bsd-generic.c index 4b32f6df..b7d7e110 100644 --- a/rtemsbsd/rtems/rtems-bsd-generic.c +++ b/rtemsbsd/rtems/rtems-bsd-generic.c @@ -37,21 +37,21 @@ * SUCH DAMAGE. */ -#include <sys/types.h> //needed for fd_mask and such -#include <freebsd/machine/rtems-bsd-config.h> - -#include <freebsd/sys/types.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/selinfo.h> -#include <freebsd/sys/fcntl.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/socketvar.h> -#include <freebsd/sys/protosw.h> -#include <freebsd/sys/select.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/lock.h> -#include <freebsd/sys/mutex.h> -#include <freebsd/sys/malloc.h> +#include <rtems/bsd/sys/types.h> //needed for fd_mask and such +#include <machine/rtems-bsd-config.h> + +#include <rtems/bsd/sys/types.h> +#include <sys/systm.h> +#include <sys/selinfo.h> +#include <sys/fcntl.h> +#include <sys/socket.h> +#include <sys/socketvar.h> +#include <sys/protosw.h> +#include <sys/select.h> +#include <sys/kernel.h> +#include <rtems/bsd/sys/lock.h> +#include <sys/mutex.h> +#include <sys/malloc.h> void selrecord(struct thread *selector, struct selinfo *sip) { diff --git a/rtemsbsd/rtems/rtems-bsd-init-with-irq.c b/rtemsbsd/rtems/rtems-bsd-init-with-irq.c index c1917e6b..a663fe34 100644 --- a/rtemsbsd/rtems/rtems-bsd-init-with-irq.c +++ b/rtemsbsd/rtems/rtems-bsd-init-with-irq.c @@ -37,11 +37,11 @@ * SUCH DAMAGE. */ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> #include <rtems/irq-extension.h> -#include <freebsd/bsd.h> +#include <rtems/bsd/bsd.h> rtems_status_code rtems_bsd_initialize_with_interrupt_server(void) diff --git a/rtemsbsd/rtems/rtems-bsd-init.c b/rtemsbsd/rtems/rtems-bsd-init.c index 429f0649..22cb1440 100644 --- a/rtemsbsd/rtems/rtems-bsd-init.c +++ b/rtemsbsd/rtems/rtems-bsd-init.c @@ -37,17 +37,17 @@ * SUCH DAMAGE. */ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> -#include <freebsd/sys/param.h> -#include <freebsd/sys/types.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/lock.h> -#include <freebsd/sys/mutex.h> -#include <freebsd/sys/proc.h> +#include <rtems/bsd/sys/param.h> +#include <rtems/bsd/sys/types.h> +#include <sys/systm.h> +#include <sys/kernel.h> +#include <rtems/bsd/sys/lock.h> +#include <sys/mutex.h> +#include <sys/proc.h> -#include <freebsd/bsd.h> +#include <rtems/bsd/bsd.h> /* In FreeBSD this is a local function */ void mi_startup(void); diff --git a/rtemsbsd/rtems/rtems-bsd-jail.c b/rtemsbsd/rtems/rtems-bsd-jail.c index 6294e98c..d6e0c345 100644 --- a/rtemsbsd/rtems/rtems-bsd-jail.c +++ b/rtemsbsd/rtems/rtems-bsd-jail.c @@ -37,38 +37,38 @@ * SUCH DAMAGE. */ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> -/*#include <freebsd/sys/types.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/jail.h> -#include <freebsd/sys/lock.h> -#include <freebsd/sys/mutex.h>*/ +/*#include <rtems/bsd/sys/types.h> +#include <sys/systm.h> +#include <sys/malloc.h> +#include <sys/jail.h> +#include <rtems/bsd/sys/lock.h> +#include <sys/mutex.h>*/ -#include <freebsd/sys/param.h> -#include <freebsd/sys/types.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/errno.h> -#include <freebsd/sys/sysproto.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/osd.h> -#include <freebsd/sys/priv.h> -#include <freebsd/sys/proc.h> -#include <freebsd/sys/taskqueue.h> -#include <freebsd/sys/fcntl.h> -#include <freebsd/sys/jail.h> -#include <freebsd/sys/lock.h> -#include <freebsd/sys/mutex.h> -#include <freebsd/sys/sx.h> -#include <freebsd/sys/sysent.h> -#include <freebsd/sys/namei.h> -#include <freebsd/sys/mount.h> -#include <freebsd/sys/queue.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/syscallsubr.h> -#include <freebsd/sys/sysctl.h> +#include <rtems/bsd/sys/param.h> +#include <rtems/bsd/sys/types.h> +#include <sys/kernel.h> +#include <sys/systm.h> +#include <rtems/bsd/sys/errno.h> +#include <sys/sysproto.h> +#include <sys/malloc.h> +#include <sys/osd.h> +#include <sys/priv.h> +#include <sys/proc.h> +#include <sys/taskqueue.h> +#include <sys/fcntl.h> +#include <sys/jail.h> +#include <rtems/bsd/sys/lock.h> +#include <sys/mutex.h> +#include <sys/sx.h> +#include <sys/sysent.h> +#include <sys/namei.h> +#include <sys/mount.h> +#include <sys/queue.h> +#include <sys/socket.h> +#include <sys/syscallsubr.h> +#include <sys/sysctl.h> #define DEFAULT_HOSTUUID "00000000-0000-0000-0000-000000000000" diff --git a/rtemsbsd/rtems/rtems-bsd-lock.c b/rtemsbsd/rtems/rtems-bsd-lock.c index 6af64ea0..fbcc6710 100644 --- a/rtemsbsd/rtems/rtems-bsd-lock.c +++ b/rtemsbsd/rtems/rtems-bsd-lock.c @@ -40,17 +40,17 @@ /* Necessary to obtain some internal functions */ #define __RTEMS_VIOLATE_KERNEL_VISIBILITY__ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> -#include <freebsd/sys/param.h> -#include <freebsd/sys/types.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/ktr.h> -#include <freebsd/sys/lock.h> -#include <freebsd/sys/mutex.h> -#include <freebsd/sys/sx.h> -#include <freebsd/sys/rwlock.h> -#include <freebsd/sys/proc.h> +#include <rtems/bsd/sys/param.h> +#include <rtems/bsd/sys/types.h> +#include <sys/systm.h> +#include <sys/ktr.h> +#include <rtems/bsd/sys/lock.h> +#include <sys/mutex.h> +#include <sys/sx.h> +#include <sys/rwlock.h> +#include <sys/proc.h> struct lock_class *lock_classes[LOCK_CLASS_MAX + 1] = { &lock_class_mtx_spin, diff --git a/rtemsbsd/rtems/rtems-bsd-log.c b/rtemsbsd/rtems/rtems-bsd-log.c index 05d94e89..fee0b1cc 100644 --- a/rtemsbsd/rtems/rtems-bsd-log.c +++ b/rtemsbsd/rtems/rtems-bsd-log.c @@ -32,10 +32,10 @@ * SUCH DAMAGE. */ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> -#include <freebsd/sys/types.h> -#include <freebsd/sys/systm.h> +#include <rtems/bsd/sys/types.h> +#include <sys/systm.h> /* * Log writes to the log buffer, and guarantees not to sleep (so can be diff --git a/rtemsbsd/rtems/rtems-bsd-malloc.c b/rtemsbsd/rtems/rtems-bsd-malloc.c index 244f6a66..f5484712 100644 --- a/rtemsbsd/rtems/rtems-bsd-malloc.c +++ b/rtemsbsd/rtems/rtems-bsd-malloc.c @@ -37,13 +37,13 @@ * SUCH DAMAGE. */ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> -#include <freebsd/sys/param.h> -#include <freebsd/sys/types.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/kernel.h> +#include <rtems/bsd/sys/param.h> +#include <rtems/bsd/sys/types.h> +#include <sys/systm.h> +#include <sys/malloc.h> +#include <sys/kernel.h> MALLOC_DEFINE(M_DEVBUF, "devbuf", "device driver memory"); diff --git a/rtemsbsd/rtems/rtems-bsd-mutex.c b/rtemsbsd/rtems/rtems-bsd-mutex.c index 23249148..bc364191 100644 --- a/rtemsbsd/rtems/rtems-bsd-mutex.c +++ b/rtemsbsd/rtems/rtems-bsd-mutex.c @@ -37,18 +37,18 @@ * SUCH DAMAGE. */ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> #include <rtems/score/objectimpl.h> #include <rtems/rtems/attrimpl.h> #include <rtems/rtems/semimpl.h> -#include <freebsd/sys/param.h> -#include <freebsd/sys/types.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/lock.h> -#include <freebsd/sys/mutex.h> -#include <freebsd/sys/proc.h> +#include <rtems/bsd/sys/param.h> +#include <rtems/bsd/sys/types.h> +#include <sys/systm.h> +#include <rtems/bsd/sys/lock.h> +#include <sys/mutex.h> +#include <sys/proc.h> static void assert_mtx(struct lock_object *lock, int what); static void lock_mtx(struct lock_object *lock, int how); diff --git a/rtemsbsd/rtems/rtems-bsd-nexus.c b/rtemsbsd/rtems/rtems-bsd-nexus.c index ba85c05d..1c2ef7a3 100644 --- a/rtemsbsd/rtems/rtems-bsd-nexus.c +++ b/rtemsbsd/rtems/rtems-bsd-nexus.c @@ -37,24 +37,24 @@ * SUCH DAMAGE. */ -#include <freebsd/machine/rtems-bsd-config.h> -#include <freebsd/machine/rtems-bsd-sysinit.h> - -#include <freebsd/sys/param.h> -#include <freebsd/sys/types.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/bus.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/module.h> -#include <freebsd/sys/rman.h> -#include <freebsd/sys/malloc.h> +#include <machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-sysinit.h> + +#include <rtems/bsd/sys/param.h> +#include <rtems/bsd/sys/types.h> +#include <sys/systm.h> +#include <sys/bus.h> +#include <sys/kernel.h> +#include <sys/module.h> +#include <sys/rman.h> +#include <sys/malloc.h> #include <bsp.h> -#include <freebsd/machine/rtems-bsd-devicet.h> +#include <machine/rtems-bsd-devicet.h> #include <bsp/irq.h> #include <rtems/irq.h> #include <rtems/irq-extension.h> -#include <freebsd/machine/bus.h> +#include <machine/bus.h> /* XXX Note: These defines should be moved. */ #if defined(__i386__) @@ -180,9 +180,10 @@ nexus_attach(device_t dev) static int nexus_probe(device_t dev) { - size_t unit = 0; #if 0 /* FIXME */ + size_t unit = 0; + for (unit = 0; _bsd_nexus_devices [unit] != NULL; ++unit) { device_add_child(dev, _bsd_nexus_devices [unit], unit); } @@ -353,9 +354,6 @@ nexus_release_resource(device_t bus, device_t child, int type, int rid, return (rman_release_resource(r)); } -static void noop(const rtems_irq_connect_data *unused) {}; -static int noop1(const rtems_irq_connect_data *unused) { return 0;}; - static int bspExtInstallSharedISR(int irqLine, void (*isr)(void *), void * uarg, int flags) { diff --git a/rtemsbsd/rtems/rtems-bsd-page.c b/rtemsbsd/rtems/rtems-bsd-page.c index 2a807178..250c8fb0 100644 --- a/rtemsbsd/rtems/rtems-bsd-page.c +++ b/rtemsbsd/rtems/rtems-bsd-page.c @@ -37,11 +37,11 @@ * SUCH DAMAGE. */ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> -#include <freebsd/sys/types.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/malloc.h> +#include <rtems/bsd/sys/types.h> +#include <sys/systm.h> +#include <sys/malloc.h> #include <rtems/chain.h> diff --git a/rtemsbsd/rtems/rtems-bsd-panic.c b/rtemsbsd/rtems/rtems-bsd-panic.c index e4361110..6b1d8507 100644 --- a/rtemsbsd/rtems/rtems-bsd-panic.c +++ b/rtemsbsd/rtems/rtems-bsd-panic.c @@ -37,15 +37,15 @@ * SUCH DAMAGE. */ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> -#include <freebsd/sys/param.h> -#include <freebsd/sys/types.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/lock.h> -#include <freebsd/sys/mutex.h> -#include <freebsd/sys/proc.h> +#include <rtems/bsd/sys/param.h> +#include <rtems/bsd/sys/types.h> +#include <sys/systm.h> +#include <sys/kernel.h> +#include <rtems/bsd/sys/lock.h> +#include <sys/mutex.h> +#include <sys/proc.h> static void suspend_all_threads(void) diff --git a/rtemsbsd/rtems/rtems-bsd-pci_bus.c b/rtemsbsd/rtems/rtems-bsd-pci_bus.c new file mode 100644 index 00000000..4ceddfce --- /dev/null +++ b/rtemsbsd/rtems/rtems-bsd-pci_bus.c @@ -0,0 +1,71 @@ +#include <machine/rtems-bsd-config.h> + +/** + * @file + * + * @ingroup rtems_bsd_rtems + * + * @brief This file contains methods that are rtems specific implementation + * of methods in pci_bus.c. + */ + +/* + * COPYRIGHT (c) 2012. On-Line Applications Research Corporation (OAR). + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); + +#include <rtems/bsd/local/opt_cpu.h> + +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/bus.h> +#include <sys/kernel.h> + +#include <dev/pci/pcivar.h> +#include <dev/pci/pcireg.h> +#include <dev/pci/pcib_private.h> +#include <machine/resource.h> + +#include <rtems/bsd/local/pcib_if.h> +#include <rtems/pci.h> +#include <machine/bus.h> + +int +pcibios_pcib_route_interrupt(device_t pcib, device_t dev, int pin) +{ + int bus; + int slot; + int func; + uint8_t irq; + + bus = pci_get_bus(dev); + slot = pci_get_slot(dev); + func = pci_get_function(dev); + + pci_read_config_byte(bus, slot, func, PCI_INTERRUPT_LINE, &irq); + return irq; +} diff --git a/rtemsbsd/rtems/rtems-bsd-pci_cfgreg.c b/rtemsbsd/rtems/rtems-bsd-pci_cfgreg.c index c6d47823..14c9edd0 100644 --- a/rtemsbsd/rtems/rtems-bsd-pci_cfgreg.c +++ b/rtemsbsd/rtems/rtems-bsd-pci_cfgreg.c @@ -1,4 +1,4 @@ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> /** * @file @@ -36,18 +36,18 @@ * SUCH DAMAGE. */ -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/bus.h> -#include <freebsd/sys/lock.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/sysctl.h> -#include <freebsd/dev/pci/pcivar.h> -#include <freebsd/dev/pci/pcireg.h> +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/bus.h> +#include <rtems/bsd/sys/lock.h> +#include <sys/kernel.h> +#include <sys/malloc.h> +#include <sys/sysctl.h> +#include <dev/pci/pcivar.h> +#include <dev/pci/pcireg.h> #include <rtems/pci.h> diff --git a/rtemsbsd/rtems/rtems-bsd-rwlock.c b/rtemsbsd/rtems/rtems-bsd-rwlock.c index a38a9a14..50e39997 100644 --- a/rtemsbsd/rtems/rtems-bsd-rwlock.c +++ b/rtemsbsd/rtems/rtems-bsd-rwlock.c @@ -37,19 +37,16 @@ * SUCH DAMAGE. */ -#include <pthread.h> - -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> #include <rtems/score/objectimpl.h> #include <rtems/posix/rwlockimpl.h> -#include <sys/types.h> -#include <freebsd/sys/param.h> -#include <freebsd/sys/types.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/lock.h> -#include <freebsd/sys/rwlock.h> +#include <rtems/bsd/sys/param.h> +#include <rtems/bsd/sys/types.h> +#include <sys/systm.h> +#include <rtems/bsd/sys/lock.h> +#include <sys/rwlock.h> #ifndef INVARIANTS #define _rw_assert(rw, what, file, line) @@ -234,7 +231,7 @@ _rw_wlock(struct rwlock *rw, const char *file, int line) { int iret; - pthread_rwlock_wrlock( &rw->lock_object.lo_id ); + iret = pthread_rwlock_wrlock( &rw->lock_object.lo_id ); BSD_ASSERT( iret == 0 ); return 0; diff --git a/rtemsbsd/rtems/rtems-bsd-shell.c b/rtemsbsd/rtems/rtems-bsd-shell.c index f80e9371..fba191a0 100644 --- a/rtemsbsd/rtems/rtems-bsd-shell.c +++ b/rtemsbsd/rtems/rtems-bsd-shell.c @@ -37,18 +37,18 @@ * SUCH DAMAGE. */ -#include <freebsd/machine/rtems-bsd-config.h> - -#include <freebsd/sys/param.h> -#include <freebsd/sys/types.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/lock.h> -#include <freebsd/sys/mutex.h> -#include <freebsd/sys/callout.h> -#include <freebsd/sys/condvar.h> -#include <freebsd/sys/proc.h> - -#include <freebsd/bsd.h> +#include <machine/rtems-bsd-config.h> + +#include <rtems/bsd/sys/param.h> +#include <rtems/bsd/sys/types.h> +#include <sys/systm.h> +#include <rtems/bsd/sys/lock.h> +#include <sys/mutex.h> +#include <sys/callout.h> +#include <sys/condvar.h> +#include <sys/proc.h> + +#include <rtems/bsd/bsd.h> #include <rtems/shell.h> static void diff --git a/rtemsbsd/rtems/rtems-bsd-signal.c b/rtemsbsd/rtems/rtems-bsd-signal.c index 8ba40693..0c024487 100644 --- a/rtemsbsd/rtems/rtems-bsd-signal.c +++ b/rtemsbsd/rtems/rtems-bsd-signal.c @@ -37,11 +37,11 @@ * SUCH DAMAGE. */ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> -#include <freebsd/sys/types.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/signalvar.h> +#include <rtems/bsd/sys/types.h> +#include <sys/systm.h> +#include <sys/signalvar.h> void psignal(struct proc *p, int sig) diff --git a/rtemsbsd/rtems/rtems-bsd-smp.c b/rtemsbsd/rtems/rtems-bsd-smp.c index f2a46520..f6cbfc8c 100644 --- a/rtemsbsd/rtems/rtems-bsd-smp.c +++ b/rtemsbsd/rtems/rtems-bsd-smp.c @@ -33,13 +33,13 @@ * SUCH DAMAGE. */ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> -#include <freebsd/sys/types.h> +#include <rtems/bsd/sys/types.h> -#include <freebsd/sys/smp.h> -#include <freebsd/machine/smp.h> -#include <freebsd/sys/sysctl.h> +#include <sys/smp.h> +#include <machine/smp.h> +#include <sys/sysctl.h> int mp_ncpus; int mp_maxcpus; diff --git a/rtemsbsd/rtems/rtems-bsd-subr_param.c b/rtemsbsd/rtems/rtems-bsd-subr_param.c index 5bdc63d2..efbd7384 100644 --- a/rtemsbsd/rtems/rtems-bsd-subr_param.c +++ b/rtemsbsd/rtems/rtems-bsd-subr_param.c @@ -32,6 +32,6 @@ * SUCH DAMAGE. */ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> int vm_guest = 0; diff --git a/rtemsbsd/rtems/rtems-bsd-support.c b/rtemsbsd/rtems/rtems-bsd-support.c index 8c0ccac7..ed34a10a 100644 --- a/rtemsbsd/rtems/rtems-bsd-support.c +++ b/rtemsbsd/rtems/rtems-bsd-support.c @@ -39,14 +39,14 @@ /* FIXME: This file needs careful review. */ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> #include <rtems/score/threaddispatch.h> -#include <freebsd/sys/types.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/uio.h> +#include <rtems/bsd/sys/types.h> +#include <sys/systm.h> +#include <sys/malloc.h> +#include <sys/uio.h> int maxproc = 32; /* XXX Used value of rtems KERN_MAXPROC */ int ngroups_max = NGROUPS_MAX; /* XXX */ diff --git a/rtemsbsd/rtems/rtems-bsd-sx.c b/rtemsbsd/rtems/rtems-bsd-sx.c index 73df4f6f..5b2bc4da 100644 --- a/rtemsbsd/rtems/rtems-bsd-sx.c +++ b/rtemsbsd/rtems/rtems-bsd-sx.c @@ -37,17 +37,17 @@ * SUCH DAMAGE. */ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> #include <rtems/score/objectimpl.h> #include <rtems/rtems/attrimpl.h> #include <rtems/rtems/semimpl.h> -#include <freebsd/sys/param.h> -#include <freebsd/sys/types.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/lock.h> -#include <freebsd/sys/sx.h> +#include <rtems/bsd/sys/param.h> +#include <rtems/bsd/sys/types.h> +#include <sys/systm.h> +#include <rtems/bsd/sys/lock.h> +#include <sys/sx.h> #ifndef INVARIANTS #define _sx_assert(sx, what, file, line) diff --git a/rtemsbsd/rtems/rtems-bsd-synch.c b/rtemsbsd/rtems/rtems-bsd-synch.c index 40e08e1c..19ab0971 100644 --- a/rtemsbsd/rtems/rtems-bsd-synch.c +++ b/rtemsbsd/rtems/rtems-bsd-synch.c @@ -41,22 +41,22 @@ * FIXME: This seems to be a completely broken implementation. */ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> #include <rtems/score/statesimpl.h> #include <rtems/score/threaddispatch.h> #include <rtems/score/thread.h> #include <rtems/score/threadqimpl.h> -#include <freebsd/sys/param.h> -#include <freebsd/sys/types.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/ktr.h> -#include <freebsd/sys/lock.h> -#include <freebsd/sys/mutex.h> -#include <freebsd/sys/proc.h> -#include <freebsd/machine/pcpu.h> +#include <rtems/bsd/sys/param.h> +#include <rtems/bsd/sys/types.h> +#include <sys/systm.h> +#include <sys/kernel.h> +#include <sys/ktr.h> +#include <rtems/bsd/sys/lock.h> +#include <sys/mutex.h> +#include <sys/proc.h> +#include <machine/pcpu.h> #define STATES_WAITING_FOR_SLEEP 0x40000 diff --git a/rtemsbsd/rtems/rtems-bsd-syscall-api.c b/rtemsbsd/rtems/rtems-bsd-syscall-api.c new file mode 100644 index 00000000..63274a0e --- /dev/null +++ b/rtemsbsd/rtems/rtems-bsd-syscall-api.c @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2013 embedded brains GmbH. All rights reserved. + * + * embedded brains GmbH + * Dornierstr. 4 + * 82178 Puchheim + * Germany + * <rtems@embedded-brains.de> + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include <machine/rtems-bsd-syscall-api.h> diff --git a/rtemsbsd/rtems/rtems-bsd-syscalls.c b/rtemsbsd/rtems/rtems-bsd-syscalls.c index 821fcc9c..4ae9de44 100644 --- a/rtemsbsd/rtems/rtems-bsd-syscalls.c +++ b/rtemsbsd/rtems/rtems-bsd-syscalls.c @@ -37,24 +37,24 @@ * SUCH DAMAGE. */ -#include <freebsd/machine/rtems-bsd-config.h> - -#include <freebsd/sys/types.h> -#include <freebsd/sys/param.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/kernel.h> -#include <freebsd/sys/lock.h> -#include <freebsd/sys/mutex.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/proc.h> -#include <freebsd/sys/fcntl.h> -#include <freebsd/sys/protosw.h> -#include <freebsd/sys/mbuf.h> -#include <freebsd/sys/socket.h> -#include <freebsd/sys/socketvar.h> -#include <freebsd/sys/uio.h> -#include <freebsd/machine/pcpu.h> -#include <freebsd/net/vnet.h> +#include <machine/rtems-bsd-config.h> + +#include <rtems/bsd/sys/types.h> +#include <rtems/bsd/sys/param.h> +#include <sys/systm.h> +#include <sys/kernel.h> +#include <rtems/bsd/sys/lock.h> +#include <sys/mutex.h> +#include <sys/malloc.h> +#include <sys/proc.h> +#include <sys/fcntl.h> +#include <sys/protosw.h> +#include <sys/mbuf.h> +#include <sys/socket.h> +#include <sys/socketvar.h> +#include <sys/uio.h> +#include <machine/pcpu.h> +#include <net/vnet.h> #include <rtems/libio_.h> #include <rtems/libio.h> diff --git a/rtemsbsd/rtems/rtems-bsd-sysctl.c b/rtemsbsd/rtems/rtems-bsd-sysctl.c index 8d3b7570..bd9f31f6 100644 --- a/rtemsbsd/rtems/rtems-bsd-sysctl.c +++ b/rtemsbsd/rtems/rtems-bsd-sysctl.c @@ -37,10 +37,11 @@ * SUCH DAMAGE. */ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> -#include <freebsd/sys/types.h> -#include <freebsd/sys/sysctl.h> +#include <rtems/bsd/sys/types.h> +#include <sys/sysctl.h> +#include <sys/errno.h> int sysctl( int *name, diff --git a/rtemsbsd/rtems/rtems-bsd-sysctlbyname.c b/rtemsbsd/rtems/rtems-bsd-sysctlbyname.c index 6b7c2018..a0ba592b 100644 --- a/rtemsbsd/rtems/rtems-bsd-sysctlbyname.c +++ b/rtemsbsd/rtems/rtems-bsd-sysctlbyname.c @@ -18,13 +18,13 @@ * */ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/sys/types.h> -#include <freebsd/sys/sysctl.h> +#include <rtems/bsd/sys/types.h> +#include <sys/sysctl.h> int sysctlbyname(const char *name, void *oldp, size_t *oldlenp, diff --git a/rtemsbsd/rtems/rtems-bsd-sysctlnametomib.c b/rtemsbsd/rtems/rtems-bsd-sysctlnametomib.c index ecd5cbf1..6f65fa5c 100644 --- a/rtemsbsd/rtems/rtems-bsd-sysctlnametomib.c +++ b/rtemsbsd/rtems/rtems-bsd-sysctlnametomib.c @@ -34,13 +34,13 @@ * SUCH DAMAGE. */ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/sys/types.h> -#include <freebsd/sys/sysctl.h> +#include <rtems/bsd/sys/types.h> +#include <sys/sysctl.h> #include <string.h> /* diff --git a/rtemsbsd/rtems/rtems-bsd-taskqueue.c b/rtemsbsd/rtems/rtems-bsd-taskqueue.c index 36bbf235..58959df2 100644 --- a/rtemsbsd/rtems/rtems-bsd-taskqueue.c +++ b/rtemsbsd/rtems/rtems-bsd-taskqueue.c @@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$"); #include <rtems.h> #include <rtems/error.h> -#include <freebsd/machine/rtems-bsd-taskqueue.h> +#include <machine/rtems-bsd-taskqueue.h> /* #define STATIC static diff --git a/rtemsbsd/rtems/rtems-bsd-thread.c b/rtemsbsd/rtems/rtems-bsd-thread.c index ca1ff1f2..357fb45c 100644 --- a/rtemsbsd/rtems/rtems-bsd-thread.c +++ b/rtemsbsd/rtems/rtems-bsd-thread.c @@ -37,19 +37,19 @@ * SUCH DAMAGE. */ -#include <freebsd/machine/rtems-bsd-config.h> - -#include <freebsd/sys/param.h> -#include <freebsd/sys/types.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/proc.h> -#include <freebsd/sys/kthread.h> -#include <freebsd/sys/malloc.h> -#include <freebsd/sys/lock.h> -#include <freebsd/sys/mutex.h> -#include <freebsd/sys/jail.h> -#include <freebsd/sys/resourcevar.h> -#include <freebsd/sys/filedesc.h> +#include <machine/rtems-bsd-config.h> + +#include <rtems/bsd/sys/param.h> +#include <rtems/bsd/sys/types.h> +#include <sys/systm.h> +#include <sys/proc.h> +#include <sys/kthread.h> +#include <sys/malloc.h> +#include <rtems/bsd/sys/lock.h> +#include <sys/mutex.h> +#include <sys/jail.h> +#include <sys/resourcevar.h> +#include <sys/filedesc.h> RTEMS_CHAIN_DEFINE_EMPTY(rtems_bsd_thread_chain); diff --git a/rtemsbsd/rtems/rtems-bsd-thread0-ucred.c b/rtemsbsd/rtems/rtems-bsd-thread0-ucred.c index 4ff61ea4..095e360b 100644 --- a/rtemsbsd/rtems/rtems-bsd-thread0-ucred.c +++ b/rtemsbsd/rtems/rtems-bsd-thread0-ucred.c @@ -30,14 +30,15 @@ * SUCH DAMAGE. */ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> -#include <freebsd/sys/param.h> -#include <freebsd/sys/types.h> -#include <freebsd/sys/systm.h> -#include <freebsd/sys/proc.h> -#include <freebsd/sys/jail.h> -#include <freebsd/sys/kernel.h> +#include <rtems/bsd/sys/param.h> +#include <rtems/bsd/sys/types.h> +#include <sys/systm.h> +#include <sys/proc.h> +#include <sys/jail.h> +#include <sys/kernel.h> +#include <sys/resourcevar.h> struct ucred *rtems_bsd_thread0_ucred; @@ -46,7 +47,6 @@ static void rtems_bsd_thread0_ucred_init(void *arg) rtems_bsd_thread0_ucred = crget(); rtems_bsd_thread0_ucred->cr_ngroups = 1; /* group 0 */ rtems_bsd_thread0_ucred->cr_uidinfo = uifind(0); - rtems_bsd_thread0_ucred = uifind(0); rtems_bsd_thread0_ucred->cr_prison = &prison0; } diff --git a/rtemsbsd/rtems/rtems-bsd-timesupport.c b/rtemsbsd/rtems/rtems-bsd-timesupport.c index 5d730c45..c26c0b07 100644 --- a/rtemsbsd/rtems/rtems-bsd-timesupport.c +++ b/rtemsbsd/rtems/rtems-bsd-timesupport.c @@ -37,7 +37,7 @@ * This violation is specifically for _Timespec_To_ticks */ #define __RTEMS_VIOLATE_KERNEL_VISIBILITY__ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> #include <rtems/score/timespec.h> diff --git a/rtemsbsd/rtems/rtems-bsd-vm_glue.c b/rtemsbsd/rtems/rtems-bsd-vm_glue.c index 284f7d60..9bee98e5 100644 --- a/rtemsbsd/rtems/rtems-bsd-vm_glue.c +++ b/rtemsbsd/rtems/rtems-bsd-vm_glue.c @@ -32,19 +32,19 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -#include <freebsd/machine/rtems-bsd-config.h> +#include <machine/rtems-bsd-config.h> -#include <freebsd/sys/types.h> -#include <sys/param.h> -#include <sys/lock.h> +#include <rtems/bsd/sys/types.h> +#include <rtems/bsd/sys/param.h> +#include <rtems/bsd/sys/lock.h> #include <sys/sched.h> -#include <freebsd/sys/cdefs.h> +#include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include <freebsd/sys/kernel.h> -#include <freebsd/vm/uma.h> -#include <freebsd/vm/uma_int.h> -#include <freebsd/sys/systm.h> +#include <sys/kernel.h> +#include <vm/uma.h> +#include <vm/uma_int.h> +#include <sys/systm.h> /* * System initialization diff --git a/rtemsbsd/rtems/rtems-net-setup.c b/rtemsbsd/rtems/rtems-net-setup.c index 7774cd26..6f33a08b 100644 --- a/rtemsbsd/rtems/rtems-net-setup.c +++ b/rtemsbsd/rtems/rtems-net-setup.c @@ -4,8 +4,9 @@ * XXX integrate using old configuration structure as it makes sense */ -#include <freebsd/bsd.h> #include <sys/socket.h> +#include <sys/sockio.h> +#include <sys/errno.h> #include <net/if.h> #include <netinet/in.h> #include <arpa/inet.h> diff --git a/rtemsbsd/rtems/rtems-syspoll.c b/rtemsbsd/rtems/rtems-syspoll.c index d53d14e8..33e05006 100644 --- a/rtemsbsd/rtems/rtems-syspoll.c +++ b/rtemsbsd/rtems/rtems-syspoll.c @@ -3,7 +3,7 @@ #include <sys/time.h> #include <rtems.h> #include <rtems/error.h> -#include <freebsd/sys/poll.h> +#include <sys/poll.h> struct poll_args { struct pollfd *fds; diff --git a/rtemsbsd/rtems/rtems-uthread_kqueue.c b/rtemsbsd/rtems/rtems-uthread_kqueue.c index 0693412f..268ca658 100644 --- a/rtemsbsd/rtems/rtems-uthread_kqueue.c +++ b/rtemsbsd/rtems/rtems-uthread_kqueue.c @@ -1,4 +1,4 @@ -#include <sys/types.h> +#include <rtems/bsd/sys/types.h> #include <fcntl.h> #include <unistd.h> #include <rtems.h> diff --git a/rtemsbsd/rtems/syslog.c b/rtemsbsd/rtems/syslog.c index 10a75a61..f2f20fd0 100644 --- a/rtemsbsd/rtems/syslog.c +++ b/rtemsbsd/rtems/syslog.c @@ -11,7 +11,7 @@ #include <stdarg.h> #include <errno.h> #include <syslog.h> -#include <sys/types.h> +#include <rtems/bsd/sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <string.h> |