├── .gitignore ├── .ycm_extra_conf.py ├── LICENSE ├── Makefile ├── README.md ├── include ├── callstk.h ├── executor.h ├── gtest │ ├── gtest-death-test.h │ ├── gtest-message.h │ ├── gtest-param-test.h │ ├── gtest-param-test.h.pump │ ├── gtest-printers.h │ ├── gtest-spi.h │ ├── gtest-test-part.h │ ├── gtest-typed-test.h │ ├── gtest.h │ ├── gtest_pred_impl.h │ ├── gtest_prod.h │ └── internal │ │ ├── gtest-death-test-internal.h │ │ ├── gtest-filepath.h │ │ ├── gtest-internal.h │ │ ├── gtest-linked_ptr.h │ │ ├── gtest-param-util-generated.h │ │ ├── gtest-param-util-generated.h.pump │ │ ├── gtest-param-util.h │ │ ├── gtest-port.h │ │ ├── gtest-string.h │ │ ├── gtest-tuple.h │ │ ├── gtest-tuple.h.pump │ │ ├── gtest-type-util.h │ │ └── gtest-type-util.h.pump ├── helper.h ├── io.h ├── istring.h ├── ivalue.h ├── libsys.h ├── loader.h ├── logger.h ├── objfile.h ├── opcode.h ├── plcmodel.h ├── rc.h ├── servo.h ├── sysenv.h ├── syslimit.h └── xenomai │ ├── analogy │ ├── analogy.h │ ├── analogy_driver.h │ ├── buffer.h │ ├── channel_range.h │ ├── command.h │ ├── context.h │ ├── descriptor.h │ ├── device.h │ ├── driver.h │ ├── instruction.h │ ├── ioctl.h │ ├── os_facilities.h │ ├── subdevice.h │ ├── transfer.h │ └── types.h │ ├── asm-arm │ └── xenomai │ ├── asm-blackfin │ ├── arith.h │ ├── atomic.h │ ├── atomic_asm.h │ ├── bits │ │ ├── bind.h │ │ ├── heap.h │ │ ├── init.h │ │ ├── intr.h │ │ ├── pod.h │ │ ├── sched.h │ │ ├── shadow.h │ │ ├── thread.h │ │ └── timer.h │ ├── calibration.h │ ├── features.h │ ├── fptest.h │ ├── hal.h │ ├── syscall.h │ ├── system.h │ ├── tsc.h │ └── wrappers.h │ ├── asm-generic │ ├── bits │ │ ├── heap.h │ │ ├── intr.h │ │ ├── pod.h │ │ └── timeconv.h │ └── xenomai │ │ ├── arith.h │ │ ├── bind.h │ │ ├── current.h │ │ ├── features.h │ │ ├── hal.h │ │ ├── pci_ids.h │ │ ├── sem_heap.h │ │ ├── sigshadow.h │ │ ├── stack.h │ │ ├── syscall.h │ │ ├── system.h │ │ ├── timeconv.h │ │ └── wrappers.h │ ├── asm-nios2 │ ├── arith.h │ ├── atomic.h │ ├── bits │ │ ├── bind.h │ │ ├── heap.h │ │ ├── init.h │ │ ├── intr.h │ │ ├── pod.h │ │ ├── sched.h │ │ ├── shadow.h │ │ ├── thread.h │ │ └── timer.h │ ├── calibration.h │ ├── features.h │ ├── fptest.h │ ├── hal.h │ ├── syscall.h │ ├── system.h │ ├── tsc.h │ └── wrappers.h │ ├── asm-powerpc │ ├── arith.h │ ├── atomic.h │ ├── atomic_asm.h │ ├── bits │ │ ├── bind.h │ │ ├── heap.h │ │ ├── init.h │ │ ├── intr.h │ │ ├── pod.h │ │ ├── sched.h │ │ ├── shadow.h │ │ ├── thread.h │ │ └── timer.h │ ├── calibration.h │ ├── features.h │ ├── fptest.h │ ├── hal.h │ ├── syscall.h │ ├── system.h │ ├── tsc.h │ └── wrappers.h │ ├── asm-sh │ ├── arith.h │ ├── atomic.h │ ├── bits │ │ ├── bind.h │ │ ├── heap.h │ │ ├── init.h │ │ ├── intr.h │ │ ├── pod.h │ │ ├── sched.h │ │ ├── shadow.h │ │ ├── thread.h │ │ └── timer.h │ ├── calibration.h │ ├── features.h │ ├── fptest.h │ ├── hal.h │ ├── switch.h │ ├── syscall.h │ ├── system.h │ ├── tsc.h │ └── wrappers.h │ ├── asm-sim │ ├── atomic.h │ ├── bits │ │ ├── heap.h │ │ ├── init.h │ │ ├── intr.h │ │ ├── pod.h │ │ ├── sched.h │ │ ├── thread.h │ │ └── timer.h │ ├── system.h │ └── xenomai │ ├── asm-x86 │ ├── arith.h │ ├── arith_32.h │ ├── arith_64.h │ ├── atomic.h │ ├── atomic_asm.h │ ├── bits │ │ ├── bind.h │ │ ├── heap.h │ │ ├── init.h │ │ ├── intr.h │ │ ├── pod.h │ │ ├── sched.h │ │ ├── shadow.h │ │ ├── thread.h │ │ └── timer.h │ ├── calibration.h │ ├── features.h │ ├── features_32.h │ ├── features_64.h │ ├── fptest.h │ ├── hal.h │ ├── hal_32.h │ ├── hal_64.h │ ├── smi.h │ ├── switch.h │ ├── switch_32.h │ ├── switch_64.h │ ├── syscall.h │ ├── system.h │ ├── tsc.h │ ├── wrappers.h │ ├── wrappers_32.h │ └── wrappers_64.h │ ├── asm │ ├── bits │ │ ├── bind.h │ │ ├── heap.h │ │ ├── init.h │ │ ├── intr.h │ │ ├── pod.h │ │ ├── sched.h │ │ ├── shadow.h │ │ ├── thread.h │ │ └── timer.h │ └── xenomai │ │ ├── arith.h │ │ ├── atomic.h │ │ ├── atomic_asm.h │ │ ├── calibration.h │ │ ├── features.h │ │ ├── fptest.h │ │ ├── hal.h │ │ ├── syscall.h │ │ ├── system.h │ │ ├── tsc.h │ │ └── wrappers.h │ ├── native │ ├── alarm.h │ ├── buffer.h │ ├── cond.h │ ├── event.h │ ├── heap.h │ ├── intr.h │ ├── misc.h │ ├── mutex.h │ ├── pipe.h │ ├── ppd.h │ ├── queue.h │ ├── sem.h │ ├── syscall.h │ ├── task.h │ ├── timer.h │ └── types.h │ ├── nucleus │ ├── assert.h │ ├── bheap.h │ ├── bufd.h │ ├── compiler.h │ ├── heap.h │ ├── hostrt.h │ ├── intr.h │ ├── jhash.h │ ├── map.h │ ├── module.h │ ├── pipe.h │ ├── pod.h │ ├── ppd.h │ ├── queue.h │ ├── registry.h │ ├── sched-idle.h │ ├── sched-rt.h │ ├── sched-sporadic.h │ ├── sched-tp.h │ ├── sched.h │ ├── schedparam.h │ ├── schedqueue.h │ ├── select.h │ ├── seqlock.h │ ├── shadow.h │ ├── stat.h │ ├── synch.h │ ├── sys_ppd.h │ ├── system.h │ ├── thread.h │ ├── timebase.h │ ├── timer.h │ ├── trace.h │ ├── types.h │ ├── vdso.h │ ├── version.h │ ├── vfile.h │ └── xenomai.h │ ├── posix │ ├── errno.h │ ├── fcntl.h │ ├── mqueue.h │ ├── posix.h │ ├── pthread.h │ ├── sched.h │ ├── semaphore.h │ ├── signal.h │ ├── stdio.h │ ├── sys │ │ ├── ioctl.h │ │ ├── mman.h │ │ ├── select.h │ │ └── socket.h │ ├── syscall.h │ ├── syslog.h │ ├── time.h │ └── unistd.h │ ├── psos+ │ ├── asr.h │ ├── defs.h │ ├── event.h │ ├── long_names.h │ ├── ppd.h │ ├── psos.h │ ├── pt.h │ ├── queue.h │ ├── rn.h │ ├── sem.h │ ├── syscall.h │ ├── task.h │ └── tm.h │ ├── rtdk.h │ ├── rtdm │ ├── rtcan.h │ ├── rtdm.h │ ├── rtdm_driver.h │ ├── rtipc.h │ ├── rtserial.h │ └── rttesting.h │ ├── uitron │ ├── syscall.h │ └── uitron.h │ ├── vrtx │ ├── syscall.h │ └── vrtx.h │ ├── vxworks │ ├── ppd.h │ ├── syscall.h │ └── vxworks.h │ ├── xeno_config.h │ └── xenomai │ ├── asm-powerpc │ ├── arith.h │ ├── atomic.h │ ├── atomic_asm.h │ ├── bits │ │ ├── bind.h │ │ ├── heap.h │ │ ├── init.h │ │ ├── intr.h │ │ ├── pod.h │ │ ├── sched.h │ │ ├── shadow.h │ │ ├── thread.h │ │ └── timer.h │ ├── calibration.h │ ├── features.h │ ├── fptest.h │ ├── hal.h │ ├── syscall.h │ ├── system.h │ ├── tsc.h │ └── wrappers.h │ ├── asm-sh │ ├── arith.h │ ├── atomic.h │ ├── bits │ │ ├── bind.h │ │ ├── heap.h │ │ ├── init.h │ │ ├── intr.h │ │ ├── pod.h │ │ ├── sched.h │ │ ├── shadow.h │ │ ├── thread.h │ │ └── timer.h │ ├── calibration.h │ ├── features.h │ ├── fptest.h │ ├── hal.h │ ├── switch.h │ ├── syscall.h │ ├── system.h │ ├── tsc.h │ └── wrappers.h │ ├── asm-sim │ ├── atomic.h │ ├── bits │ │ ├── heap.h │ │ ├── init.h │ │ ├── intr.h │ │ ├── pod.h │ │ ├── sched.h │ │ ├── thread.h │ │ └── timer.h │ └── system.h │ ├── asm-x86 │ ├── arith.h │ ├── arith_32.h │ ├── arith_64.h │ ├── atomic.h │ ├── atomic_asm.h │ ├── bits │ │ ├── bind.h │ │ ├── heap.h │ │ ├── init.h │ │ ├── intr.h │ │ ├── pod.h │ │ ├── sched.h │ │ ├── shadow.h │ │ ├── thread.h │ │ └── timer.h │ ├── calibration.h │ ├── features.h │ ├── features_32.h │ ├── features_64.h │ ├── fptest.h │ ├── hal.h │ ├── hal_32.h │ ├── hal_64.h │ ├── smi.h │ ├── switch.h │ ├── switch_32.h │ ├── switch_64.h │ ├── syscall.h │ ├── system.h │ ├── tsc.h │ ├── wrappers.h │ ├── wrappers_32.h │ └── wrappers_64.h │ ├── native │ ├── alarm.h │ ├── buffer.h │ ├── cond.h │ ├── event.h │ ├── heap.h │ ├── intr.h │ ├── misc.h │ ├── mutex.h │ ├── pipe.h │ ├── ppd.h │ ├── queue.h │ ├── sem.h │ ├── syscall.h │ ├── task.h │ ├── timer.h │ └── types.h │ ├── nucleus │ ├── assert.h │ ├── bheap.h │ ├── bufd.h │ ├── compiler.h │ ├── heap.h │ ├── hostrt.h │ ├── intr.h │ ├── jhash.h │ ├── map.h │ ├── module.h │ ├── pipe.h │ ├── pod.h │ ├── ppd.h │ ├── queue.h │ ├── registry.h │ ├── sched-idle.h │ ├── sched-rt.h │ ├── sched-sporadic.h │ ├── sched-tp.h │ ├── sched.h │ ├── schedparam.h │ ├── schedqueue.h │ ├── select.h │ ├── seqlock.h │ ├── shadow.h │ ├── stat.h │ ├── synch.h │ ├── sys_ppd.h │ ├── system.h │ ├── thread.h │ ├── timebase.h │ ├── timer.h │ ├── trace.h │ ├── types.h │ ├── vdso.h │ ├── version.h │ ├── vfile.h │ └── xenomai.h │ ├── posix │ ├── errno.h │ ├── fcntl.h │ ├── mqueue.h │ ├── posix.h │ ├── pthread.h │ ├── sched.h │ ├── semaphore.h │ ├── signal.h │ ├── stdio.h │ ├── sys │ │ ├── ioctl.h │ │ ├── mman.h │ │ ├── select.h │ │ └── socket.h │ ├── syscall.h │ ├── syslog.h │ ├── time.h │ └── unistd.h │ ├── psos+ │ ├── asr.h │ ├── defs.h │ ├── event.h │ ├── long_names.h │ ├── ppd.h │ ├── psos.h │ ├── pt.h │ ├── queue.h │ ├── rn.h │ ├── sem.h │ ├── syscall.h │ ├── task.h │ └── tm.h │ ├── rtdm │ ├── rtcan.h │ ├── rtdm.h │ ├── rtdm_driver.h │ ├── rtipc.h │ ├── rtserial.h │ └── rttesting.h │ ├── uitron │ ├── syscall.h │ └── uitron.h │ ├── vrtx │ ├── syscall.h │ └── vrtx.h │ ├── vxworks │ ├── ppd.h │ ├── syscall.h │ └── vxworks.h │ └── xenomai │ ├── analogy │ ├── analogy.h │ ├── analogy_driver.h │ ├── buffer.h │ ├── channel_range.h │ ├── command.h │ ├── context.h │ ├── descriptor.h │ ├── device.h │ ├── driver.h │ ├── instruction.h │ ├── ioctl.h │ ├── os_facilities.h │ ├── subdevice.h │ ├── transfer.h │ └── types.h │ ├── asm-arm │ ├── arith.h │ ├── atomic.h │ ├── atomic_asm.h │ ├── bits │ │ ├── bind.h │ │ ├── heap.h │ │ ├── init.h │ │ ├── intr.h │ │ ├── pod.h │ │ ├── sched.h │ │ ├── shadow.h │ │ ├── thread.h │ │ └── timer.h │ ├── calibration.h │ ├── features.h │ ├── fptest.h │ ├── hal.h │ ├── syscall.h │ ├── system.h │ ├── tsc.h │ └── wrappers.h │ ├── asm-blackfin │ ├── arith.h │ ├── atomic.h │ ├── atomic_asm.h │ ├── bits │ │ ├── bind.h │ │ ├── heap.h │ │ ├── init.h │ │ ├── intr.h │ │ ├── pod.h │ │ ├── sched.h │ │ ├── shadow.h │ │ ├── thread.h │ │ └── timer.h │ ├── calibration.h │ ├── features.h │ ├── fptest.h │ ├── hal.h │ ├── syscall.h │ ├── system.h │ ├── tsc.h │ └── wrappers.h │ ├── asm-generic │ ├── arith.h │ ├── bind.h │ ├── bits │ │ ├── heap.h │ │ ├── intr.h │ │ ├── pod.h │ │ └── timeconv.h │ ├── current.h │ ├── features.h │ ├── hal.h │ ├── pci_ids.h │ ├── sem_heap.h │ ├── sigshadow.h │ ├── stack.h │ ├── syscall.h │ ├── system.h │ ├── timeconv.h │ └── wrappers.h │ ├── asm-nios2 │ ├── arith.h │ ├── atomic.h │ ├── bits │ │ ├── bind.h │ │ ├── heap.h │ │ ├── init.h │ │ ├── intr.h │ │ ├── pod.h │ │ ├── sched.h │ │ ├── shadow.h │ │ ├── thread.h │ │ └── timer.h │ ├── calibration.h │ ├── features.h │ ├── fptest.h │ ├── hal.h │ ├── syscall.h │ ├── system.h │ ├── tsc.h │ └── wrappers.h │ ├── asm-powerpc │ ├── arith.h │ ├── atomic.h │ ├── atomic_asm.h │ ├── bits │ │ ├── bind.h │ │ ├── heap.h │ │ ├── init.h │ │ ├── intr.h │ │ ├── pod.h │ │ ├── sched.h │ │ ├── shadow.h │ │ ├── thread.h │ │ └── timer.h │ ├── calibration.h │ ├── features.h │ ├── fptest.h │ ├── hal.h │ ├── syscall.h │ ├── system.h │ ├── tsc.h │ └── wrappers.h │ ├── asm-sh │ ├── arith.h │ ├── atomic.h │ ├── bits │ │ ├── bind.h │ │ ├── heap.h │ │ ├── init.h │ │ ├── intr.h │ │ ├── pod.h │ │ ├── sched.h │ │ ├── shadow.h │ │ ├── thread.h │ │ └── timer.h │ ├── calibration.h │ ├── features.h │ ├── fptest.h │ ├── hal.h │ ├── switch.h │ ├── syscall.h │ ├── system.h │ ├── tsc.h │ └── wrappers.h │ ├── asm-sim │ ├── atomic.h │ ├── bits │ │ ├── heap.h │ │ ├── init.h │ │ ├── intr.h │ │ ├── pod.h │ │ ├── sched.h │ │ ├── thread.h │ │ └── timer.h │ └── system.h │ ├── asm-x86 │ ├── arith.h │ ├── arith_32.h │ ├── arith_64.h │ ├── atomic.h │ ├── atomic_asm.h │ ├── bits │ │ ├── bind.h │ │ ├── heap.h │ │ ├── init.h │ │ ├── intr.h │ │ ├── pod.h │ │ ├── sched.h │ │ ├── shadow.h │ │ ├── thread.h │ │ └── timer.h │ ├── calibration.h │ ├── features.h │ ├── features_32.h │ ├── features_64.h │ ├── fptest.h │ ├── hal.h │ ├── hal_32.h │ ├── hal_64.h │ ├── smi.h │ ├── switch.h │ ├── switch_32.h │ ├── switch_64.h │ ├── syscall.h │ ├── system.h │ ├── tsc.h │ ├── wrappers.h │ ├── wrappers_32.h │ └── wrappers_64.h │ ├── asm │ ├── arith.h │ ├── atomic.h │ ├── atomic_asm.h │ ├── bits │ │ ├── bind.h │ │ ├── heap.h │ │ ├── init.h │ │ ├── intr.h │ │ ├── pod.h │ │ ├── sched.h │ │ ├── shadow.h │ │ ├── thread.h │ │ └── timer.h │ ├── calibration.h │ ├── features.h │ ├── fptest.h │ ├── hal.h │ ├── syscall.h │ ├── system.h │ ├── tsc.h │ └── wrappers.h │ ├── native │ ├── alarm.h │ ├── buffer.h │ ├── cond.h │ ├── event.h │ ├── heap.h │ ├── intr.h │ ├── misc.h │ ├── mutex.h │ ├── pipe.h │ ├── ppd.h │ ├── queue.h │ ├── sem.h │ ├── syscall.h │ ├── task.h │ ├── timer.h │ └── types.h │ ├── nucleus │ ├── assert.h │ ├── bheap.h │ ├── bufd.h │ ├── compiler.h │ ├── heap.h │ ├── hostrt.h │ ├── intr.h │ ├── jhash.h │ ├── map.h │ ├── module.h │ ├── pipe.h │ ├── pod.h │ ├── ppd.h │ ├── queue.h │ ├── registry.h │ ├── sched-idle.h │ ├── sched-rt.h │ ├── sched-sporadic.h │ ├── sched-tp.h │ ├── sched.h │ ├── schedparam.h │ ├── schedqueue.h │ ├── select.h │ ├── seqlock.h │ ├── shadow.h │ ├── stat.h │ ├── synch.h │ ├── sys_ppd.h │ ├── system.h │ ├── thread.h │ ├── timebase.h │ ├── timer.h │ ├── trace.h │ ├── types.h │ ├── vdso.h │ ├── version.h │ ├── vfile.h │ └── xenomai.h │ ├── posix │ ├── errno.h │ ├── fcntl.h │ ├── mqueue.h │ ├── posix.h │ ├── pthread.h │ ├── sched.h │ ├── semaphore.h │ ├── signal.h │ ├── stdio.h │ ├── sys │ │ ├── ioctl.h │ │ ├── mman.h │ │ ├── select.h │ │ └── socket.h │ ├── syscall.h │ ├── syslog.h │ ├── time.h │ └── unistd.h │ ├── psos+ │ ├── asr.h │ ├── defs.h │ ├── event.h │ ├── long_names.h │ ├── ppd.h │ ├── psos.h │ ├── pt.h │ ├── queue.h │ ├── rn.h │ ├── sem.h │ ├── syscall.h │ ├── task.h │ └── tm.h │ ├── rtdk.h │ ├── rtdm │ ├── rtcan.h │ ├── rtdm.h │ ├── rtdm_driver.h │ ├── rtipc.h │ ├── rtserial.h │ └── rttesting.h │ ├── uitron │ ├── syscall.h │ └── uitron.h │ ├── vrtx │ ├── syscall.h │ └── vrtx.h │ ├── vxworks │ ├── ppd.h │ ├── syscall.h │ └── vxworks.h │ ├── xeno_config.h │ └── xenomai │ ├── analogy │ ├── analogy.h │ ├── analogy_driver.h │ ├── buffer.h │ ├── channel_range.h │ ├── command.h │ ├── context.h │ ├── descriptor.h │ ├── device.h │ ├── driver.h │ ├── instruction.h │ ├── ioctl.h │ ├── os_facilities.h │ ├── subdevice.h │ ├── transfer.h │ └── types.h │ ├── asm-arm │ ├── arith.h │ ├── atomic.h │ ├── atomic_asm.h │ ├── bits │ │ ├── bind.h │ │ ├── heap.h │ │ ├── init.h │ │ ├── intr.h │ │ ├── pod.h │ │ ├── sched.h │ │ ├── shadow.h │ │ ├── thread.h │ │ └── timer.h │ ├── calibration.h │ ├── features.h │ ├── fptest.h │ ├── hal.h │ ├── syscall.h │ ├── system.h │ ├── tsc.h │ └── wrappers.h │ ├── asm-blackfin │ ├── arith.h │ ├── atomic.h │ ├── atomic_asm.h │ ├── bits │ │ ├── bind.h │ │ ├── heap.h │ │ ├── init.h │ │ ├── intr.h │ │ ├── pod.h │ │ ├── sched.h │ │ ├── shadow.h │ │ ├── thread.h │ │ └── timer.h │ ├── calibration.h │ ├── features.h │ ├── fptest.h │ ├── hal.h │ ├── syscall.h │ ├── system.h │ ├── tsc.h │ └── wrappers.h │ ├── asm-generic │ ├── arith.h │ ├── bind.h │ ├── bits │ │ ├── heap.h │ │ ├── intr.h │ │ ├── pod.h │ │ └── timeconv.h │ ├── current.h │ ├── features.h │ ├── hal.h │ ├── pci_ids.h │ ├── sem_heap.h │ ├── sigshadow.h │ ├── stack.h │ ├── syscall.h │ ├── system.h │ ├── timeconv.h │ └── wrappers.h │ ├── asm-nios2 │ ├── arith.h │ ├── atomic.h │ ├── bits │ │ ├── bind.h │ │ ├── heap.h │ │ ├── init.h │ │ ├── intr.h │ │ ├── pod.h │ │ ├── sched.h │ │ ├── shadow.h │ │ ├── thread.h │ │ └── timer.h │ ├── calibration.h │ ├── features.h │ ├── fptest.h │ ├── hal.h │ ├── syscall.h │ ├── system.h │ ├── tsc.h │ └── wrappers.h │ ├── asm-powerpc │ ├── arith.h │ ├── atomic.h │ ├── atomic_asm.h │ ├── bits │ │ ├── bind.h │ │ ├── heap.h │ │ ├── init.h │ │ ├── intr.h │ │ ├── pod.h │ │ ├── sched.h │ │ ├── shadow.h │ │ ├── thread.h │ │ └── timer.h │ ├── calibration.h │ ├── features.h │ ├── fptest.h │ ├── hal.h │ ├── syscall.h │ ├── system.h │ ├── tsc.h │ └── wrappers.h │ ├── asm-sh │ ├── arith.h │ ├── atomic.h │ ├── bits │ │ ├── bind.h │ │ ├── heap.h │ │ ├── init.h │ │ ├── intr.h │ │ ├── pod.h │ │ ├── sched.h │ │ ├── shadow.h │ │ ├── thread.h │ │ └── timer.h │ ├── calibration.h │ ├── features.h │ ├── fptest.h │ ├── hal.h │ ├── switch.h │ ├── syscall.h │ ├── system.h │ ├── tsc.h │ └── wrappers.h │ ├── asm-sim │ ├── atomic.h │ ├── bits │ │ ├── heap.h │ │ ├── init.h │ │ ├── intr.h │ │ ├── pod.h │ │ ├── sched.h │ │ ├── thread.h │ │ └── timer.h │ └── system.h │ ├── asm-x86 │ ├── arith.h │ ├── arith_32.h │ ├── arith_64.h │ ├── atomic.h │ ├── atomic_asm.h │ ├── bits │ │ ├── bind.h │ │ ├── heap.h │ │ ├── init.h │ │ ├── intr.h │ │ ├── pod.h │ │ ├── sched.h │ │ ├── shadow.h │ │ ├── thread.h │ │ └── timer.h │ ├── calibration.h │ ├── features.h │ ├── features_32.h │ ├── features_64.h │ ├── fptest.h │ ├── hal.h │ ├── hal_32.h │ ├── hal_64.h │ ├── smi.h │ ├── switch.h │ ├── switch_32.h │ ├── switch_64.h │ ├── syscall.h │ ├── system.h │ ├── tsc.h │ ├── wrappers.h │ ├── wrappers_32.h │ └── wrappers_64.h │ ├── asm │ ├── arith.h │ ├── atomic.h │ ├── atomic_asm.h │ ├── bits │ │ ├── bind.h │ │ ├── heap.h │ │ ├── init.h │ │ ├── intr.h │ │ ├── pod.h │ │ ├── sched.h │ │ ├── shadow.h │ │ ├── thread.h │ │ └── timer.h │ ├── calibration.h │ ├── features.h │ ├── fptest.h │ ├── hal.h │ ├── syscall.h │ ├── system.h │ ├── tsc.h │ └── wrappers.h │ ├── native │ ├── alarm.h │ ├── buffer.h │ ├── cond.h │ ├── event.h │ ├── heap.h │ ├── intr.h │ ├── misc.h │ ├── mutex.h │ ├── pipe.h │ ├── ppd.h │ ├── queue.h │ ├── sem.h │ ├── syscall.h │ ├── task.h │ ├── timer.h │ └── types.h │ ├── nucleus │ ├── assert.h │ ├── bheap.h │ ├── bufd.h │ ├── compiler.h │ ├── heap.h │ ├── hostrt.h │ ├── intr.h │ ├── jhash.h │ ├── map.h │ ├── module.h │ ├── pipe.h │ ├── pod.h │ ├── ppd.h │ ├── queue.h │ ├── registry.h │ ├── sched-idle.h │ ├── sched-rt.h │ ├── sched-sporadic.h │ ├── sched-tp.h │ ├── sched.h │ ├── schedparam.h │ ├── schedqueue.h │ ├── select.h │ ├── seqlock.h │ ├── shadow.h │ ├── stat.h │ ├── synch.h │ ├── sys_ppd.h │ ├── system.h │ ├── thread.h │ ├── timebase.h │ ├── timer.h │ ├── trace.h │ ├── types.h │ ├── vdso.h │ ├── version.h │ ├── vfile.h │ └── xenomai.h │ ├── posix │ ├── errno.h │ ├── fcntl.h │ ├── mqueue.h │ ├── posix.h │ ├── pthread.h │ ├── sched.h │ ├── semaphore.h │ ├── signal.h │ ├── stdio.h │ ├── sys │ │ ├── ioctl.h │ │ ├── mman.h │ │ ├── select.h │ │ └── socket.h │ ├── syscall.h │ ├── syslog.h │ ├── time.h │ └── unistd.h │ ├── psos+ │ ├── asr.h │ ├── defs.h │ ├── event.h │ ├── long_names.h │ ├── ppd.h │ ├── psos.h │ ├── pt.h │ ├── queue.h │ ├── rn.h │ ├── sem.h │ ├── syscall.h │ ├── task.h │ └── tm.h │ ├── rtdk.h │ ├── rtdm │ ├── rtcan.h │ ├── rtdm.h │ ├── rtdm_driver.h │ ├── rtipc.h │ ├── rtserial.h │ └── rttesting.h │ ├── uitron │ ├── syscall.h │ └── uitron.h │ ├── vrtx │ ├── syscall.h │ └── vrtx.h │ ├── vxworks │ ├── ppd.h │ ├── syscall.h │ └── vxworks.h │ └── xeno_config.h ├── lib └── xenomai │ ├── .goutputstream-AGELHX │ ├── libanalogy.la │ ├── libnative.la │ ├── libpsos.la │ ├── libpthread_rt.la │ ├── librtdm.la │ ├── libuitron.la │ ├── libvrtx.la │ ├── libvxworks.la │ ├── libxenomai.la │ ├── pkgconfig │ ├── libxenomai_native.pc │ ├── libxenomai_posix.pc │ ├── libxenomai_psos+.pc │ ├── libxenomai_rtdm.pc │ ├── libxenomai_uitron.pc │ ├── libxenomai_vrtx.pc │ └── libxenomai_vxworks.pc │ └── posix.wrappers ├── onekey.sh ├── src ├── callstk.cc ├── executor.cc ├── io.cc ├── istring.cc ├── libsys │ └── libbase.cc ├── loader.cc ├── main.cc ├── rc.cc └── servo.cc ├── test ├── arithmetic.test ├── bitop.test ├── comparison.test ├── flowcontrol.test ├── io.test ├── logicop.test ├── scall.test └── ucall.test └── translator.py /.gitignore: -------------------------------------------------------------------------------- 1 | # Object files 2 | *.o 3 | *.ko 4 | *.obj 5 | *.elf 6 | 7 | # Libraries 8 | *.lib 9 | *.a 10 | 11 | # Shared objects (inc. Windows DLLs) 12 | *.dll 13 | *.so 14 | *.so.* 15 | *.dylib 16 | 17 | # Executables 18 | *.exe 19 | *.out 20 | *.app 21 | *.i*86 22 | *.x86_64 23 | *.hex 24 | 25 | # Others 26 | *.pyc 27 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2015 Bolong Tan 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | EXECUTABLE := ./iec-runtime # 可执行文件名 2 | LIBDIR := ./lib/xenomai # 静态库目录 3 | LIBS := native xenomai pthread_rt # 静态库文件名 4 | INCLUDES := ./include ./include/xenomai # 头文件目录 5 | SRCDIR := ./src ./src/libsys# 除了当前目录外,其他的源代码文件目录 6 | 7 | CC = arm-none-linux-gnueabi-g++ 8 | CXX = arm-none-linux-gnueabi-g++ 9 | CFLAGS := -std=c++0x 10 | CPPFLAGS += $(CFLAGS) $(addprefix -I,$(INCLUDES)) 11 | 12 | RM-F := rm -f 13 | 14 | SRCS := $(wildcard *.cc) $(wildcard $(addsuffix /*.cc, $(SRCDIR))) 15 | OBJS := $(patsubst %.cc,%.o,$(SRCS)) 16 | 17 | .PHONY : all clean rebuild 18 | 19 | all: $(EXECUTABLE) 20 | 21 | clean : 22 | @$(RM-F) ${OBJS} 23 | @$(RM-F) $(EXECUTABLE) 24 | 25 | rebuild: clean all 26 | 27 | $(EXECUTABLE) : $(OBJS) 28 | $(CXX) -o $(EXECUTABLE) $(OBJS) $(addprefix -L,$(LIBDIR)) $(addprefix -l,$(LIBS)) 29 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | iec-runtime 2 | =========== 3 | 4 | IEC61131-3 runtime system based on xenomai 5 | -------------------------------------------------------------------------------- /include/executor.h: -------------------------------------------------------------------------------- 1 | #ifndef __EXECUTOR_H__ 2 | #define __EXECUTOR_H__ 3 | 4 | #include "plcmodel.h" 5 | 6 | static void executor(void *task); 7 | void plc_task_init(TaskList *task_list); 8 | void plc_task_start(TaskList *task_list); 9 | void plc_task_delete(TaskList *task_list); 10 | #endif 11 | -------------------------------------------------------------------------------- /include/helper.h: -------------------------------------------------------------------------------- 1 | #ifndef __HELPER_H__ 2 | #define __HELPER_H__ 3 | 4 | #include 5 | 6 | /*----------------------------------------------------------------------------- 7 | * Helper Funtion Macros 8 | *---------------------------------------------------------------------------*/ 9 | /* creates a mask with `n' 1 bits at position `p' */ 10 | #define MASK1(p,n) ((~((~(uint32_t)0)<<(n)))<<(p)) 11 | /* creates a mask with `n' 0 bits at position `p' */ 12 | #define MASK0(p,n) (~MASK1(p,n)) 13 | #define cast(type, exp) ((type)(exp)) 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /include/istring.h: -------------------------------------------------------------------------------- 1 | #ifndef __ISTRING_H__ 2 | #define __ISTRING_H__ 3 | 4 | #include 5 | 6 | typedef struct { 7 | uint32_t size; /* string pool capacity */ 8 | uint32_t index; /* point to free space */ 9 | char *base; /* string pool base address */ 10 | } StrPool; 11 | 12 | int sp_init(StrPool *sp, uint32_t size); 13 | char *sp_add(StrPool *sp, const char *str, uint32_t size); 14 | void sp_clean(StrPool *sp); 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /include/objfile.h: -------------------------------------------------------------------------------- 1 | #ifndef __OBJFILE_H__ 2 | #define __OBJFILE_H__ 3 | 4 | #include 5 | 6 | /*----------------------------------------------------------------------------- 7 | * Definition of PLC Object File Header 8 | *---------------------------------------------------------------------------*/ 9 | #define MAGIC "\x7FPLC" 10 | #define MAGIC_SIZE 5 /* including '\0' */ 11 | 12 | typedef struct { 13 | char magic[MAGIC_SIZE]; /* magic number */ 14 | uint8_t type; /* type of object file: 32BIT | 64BIT */ 15 | uint8_t order; /* byte order: LITTLE-ENDIAN | BIG-ENDIAN */ 16 | uint8_t version; /* version of object file (default: 1)*/ 17 | uint8_t machine; /* CPU platform */ 18 | } OBJHeader; 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /include/rc.h: -------------------------------------------------------------------------------- 1 | #ifndef __RC_H__ 2 | #define __RC_H__ 3 | 4 | #include "plcmodel.h" 5 | 6 | #define RC_TASK_NAME "rc_task" 7 | #define RC_TASK_PRIORITY 91 8 | 9 | /* TODO Add multiple axis ?? */ 10 | typedef struct { 11 | double command_pos; 12 | double command_vel; 13 | double command_acc; 14 | double actual_pos; 15 | double actual_vel; 16 | double actual_acc; 17 | } INTERP_DATA; /* Single axis interpolation command & actual data from RC */ 18 | 19 | 20 | //static void interp_input_update(); 21 | //static void interp_output_update(); 22 | static void interp_calculate(void *config); /* TODO NOTE single/multiple axis interpolation */ 23 | static void rc_task_create(); 24 | void rc_task_init(RobotConfig *config); 25 | void rc_task_start(RobotConfig *config); 26 | void rc_task_delete(); 27 | #endif 28 | -------------------------------------------------------------------------------- /include/servo.h: -------------------------------------------------------------------------------- 1 | #ifndef __SERVO_H__ 2 | #define __SERVO_H__ 3 | 4 | #include "plcmodel.h" 5 | 6 | #define SERVO_TASK_NAME "servo_task" 7 | #define SERVO_TASK_PRIORITY 70 8 | typedef struct { 9 | double actual_pos; 10 | double actual_vel; 11 | double actual_acc; 12 | double command_pos; 13 | double command_vel; 14 | double command_acc; 15 | } AXIS_DATA; /* Axis Runtime Data */ 16 | 17 | 18 | static void servo_update(void *config); 19 | static void servo_task_create(); 20 | void servo_task_init(ServoConfig *config); 21 | void servo_task_start(ServoConfig *config); 22 | void servo_task_delete(); 23 | #endif 24 | -------------------------------------------------------------------------------- /include/sysenv.h: -------------------------------------------------------------------------------- 1 | #ifndef __SYSENV_H__ 2 | #define __SYSENV_H__ 3 | 4 | /*----------------------------------------------------------------------------- 5 | * PLC Object File Header 6 | *---------------------------------------------------------------------------*/ 7 | #define SYS_TYPE_32 1 8 | #define SYS_TYPE_64 2 9 | #define BYTE_ORDER_LIT 1 10 | #define BYTE_ORDER_BIG 2 11 | #define MACH_CORTEX_A8 1 12 | /*----------------------------------------------------------------------------- 13 | * Servo 14 | *---------------------------------------------------------------------------*/ 15 | #define AXIS_TYPE_FINITE 1 16 | #define AXIS_TYPE_MODULO 2 17 | #define AXIS_INDEPENDENT 1 18 | #define AXIS_COMBINED 2 19 | #define OPMODE_POS 1 20 | #define OPMODE_VEL 2 21 | #define OPMODE_TOR 3 22 | /*----------------------------------------------------------------------------- 23 | * PLC Task 24 | *---------------------------------------------------------------------------*/ 25 | #define TASK_TYPE_SIGNAL 1 26 | #define TASK_TYPE_INTERVAL 2 27 | /*----------------------------------------------------------------------------- 28 | * System Environment 29 | *---------------------------------------------------------------------------*/ 30 | #define SYS_TYPE SYS_TYPE_32 31 | #define SYS_BYTE_ORDER BYTE_ORDER_LIT 32 | #define SYS_VERSION 1 33 | #define SYS_MACHINE MACH_CORTEX_A8 34 | #endif 35 | -------------------------------------------------------------------------------- /include/xenomai/analogy/analogy_driver.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * Analogy for Linux, driver facilities 4 | * 5 | * Copyright (C) 1997-2000 David A. Schleef 6 | * Copyright (C) 2008 Alexis Berlemont 7 | * 8 | * Xenomai is free software; you can redistribute it and/or modify it 9 | * under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Xenomai is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Xenomai; if not, write to the Free Software Foundation, 20 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 | */ 22 | 23 | #ifndef __ANALOGY_ANALOGY_DRIVER__ 24 | #define __ANALOGY_ANALOGY_DRIVER__ 25 | 26 | #ifndef __KERNEL__ 27 | #error This header is for kernel space usage only. \ 28 | You are likely looking for ... 29 | #endif /* !__KERNEL__ */ 30 | 31 | #include 32 | #include 33 | #include 34 | 35 | #endif /* __ANALOGY_ANALOGY_DRIVER__ */ 36 | -------------------------------------------------------------------------------- /include/xenomai/analogy/types.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * Analogy for Linux, misc declarations 4 | * 5 | * Copyright (C) 1997-2000 David A. Schleef 6 | * Copyright (C) 2008 Alexis Berlemont 7 | * 8 | * Xenomai is free software; you can redistribute it and/or modify it 9 | * under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Xenomai is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Xenomai; if not, write to the Free Software Foundation, 20 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 | */ 22 | 23 | #ifndef __ANALOGY_TYPES__ 24 | #define __ANALOGY_TYPES__ 25 | 26 | #ifndef DOXYGEN_CPP 27 | 28 | /* --- Misc precompilation constant --- */ 29 | #define A4L_NAMELEN 20 30 | 31 | /* --- Common Analogy types --- */ 32 | 33 | typedef unsigned short sampl_t; 34 | typedef unsigned long lsampl_t; 35 | 36 | #endif /* !DOXYGEN_CPP */ 37 | 38 | #endif /* __ANALOGY_TYPES__ */ 39 | -------------------------------------------------------------------------------- /include/xenomai/asm-arm/xenomai: -------------------------------------------------------------------------------- 1 | IntxLNK. -------------------------------------------------------------------------------- /include/xenomai/asm-blackfin/bits/bind.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_ASM_BLACKFIN_BIND_H 2 | #define _XENO_ASM_BLACKFIN_BIND_H 3 | 4 | #include 5 | 6 | #endif /* _XENO_ASM_BLACKFIN_BIND_H */ 7 | -------------------------------------------------------------------------------- /include/xenomai/asm-blackfin/bits/heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_ASM_BLACKFIN_BITS_HEAP_H 21 | #define _XENO_ASM_BLACKFIN_BITS_HEAP_H 22 | 23 | #include 24 | 25 | #endif /* !_XENO_ASM_BLACKFIN_BITS_HEAP_H */ 26 | -------------------------------------------------------------------------------- /include/xenomai/asm-blackfin/bits/intr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_ASM_BLACKFIN_BITS_INTR_H 21 | #define _XENO_ASM_BLACKFIN_BITS_INTR_H 22 | 23 | #include 24 | 25 | static inline void xnarch_relay_tick(void) 26 | { 27 | #ifdef CONFIG_GENERIC_CLOCKEVENTS 28 | rthal_irq_host_pend(RTHAL_TIMER_IRQ); 29 | #endif 30 | } 31 | 32 | #endif /* !_XENO_ASM_BLACKFIN_BITS_INTR_H */ 33 | -------------------------------------------------------------------------------- /include/xenomai/asm-blackfin/bits/sched.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_ASM_BLACKFIN_BITS_SCHED_H 21 | #define _XENO_ASM_BLACKFIN_BITS_SCHED_H 22 | 23 | static inline void xnarch_init_root_tcb(xnarchtcb_t * tcb, 24 | struct xnthread *thread, 25 | const char *name) 26 | { 27 | tcb->user_task = current; 28 | #ifdef CONFIG_MPU 29 | tcb->active_task = NULL; 30 | #endif 31 | tcb->tsp = &tcb->ts; 32 | tcb->entry = NULL; 33 | tcb->cookie = NULL; 34 | tcb->self = thread; 35 | tcb->imask = 0; 36 | tcb->name = name; 37 | } 38 | 39 | #endif /* !_XENO_ASM_BLACKFIN_BITS_SCHED_H */ 40 | -------------------------------------------------------------------------------- /include/xenomai/asm-blackfin/fptest.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_ASM_BLACKFIN_FPTEST_H 2 | #define _XENO_ASM_BLACKFIN_FPTEST_H 3 | 4 | #ifdef __KERNEL__ 5 | #include 6 | 7 | static inline int fp_kernel_supported(void) 8 | { 9 | return 0; 10 | } 11 | 12 | static inline int fp_linux_begin(void) 13 | { 14 | return -ENOSYS; 15 | } 16 | 17 | static inline void fp_linux_end(void) 18 | { 19 | } 20 | 21 | #else /* !__KERNEL__ */ 22 | #include 23 | #define printk printf 24 | #endif /* !__KERNEL__ */ 25 | 26 | static inline void fp_features_init(void) 27 | { 28 | } 29 | 30 | static inline void fp_regs_set(unsigned val) 31 | { 32 | } 33 | 34 | static inline unsigned fp_regs_check(unsigned val) 35 | { 36 | return val; 37 | } 38 | 39 | #endif /* _XENO_ASM_BLACKFIN_FPTEST_H */ 40 | -------------------------------------------------------------------------------- /include/xenomai/asm-generic/bits/heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003,2004,2005 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_ASM_GENERIC_BITS_HEAP_H 21 | #define _XENO_ASM_GENERIC_BITS_HEAP_H 22 | 23 | #ifndef __KERNEL__ 24 | #error "Pure kernel header included from user-space!" 25 | #endif 26 | 27 | static inline void xnarch_init_heapcb (xnarch_heapcb_t *hcb) 28 | 29 | { 30 | hcb->numaps = 0; 31 | hcb->kmflags = 0; 32 | hcb->heapbase = NULL; 33 | } 34 | 35 | #endif /* !_XENO_ASM_GENERIC_BITS_HEAP_H */ 36 | -------------------------------------------------------------------------------- /include/xenomai/asm-generic/xenomai/bind.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_ASM_GENERIC_BITS_BIND_H 2 | #define _XENO_ASM_GENERIC_BITS_BIND_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include /* For __constructor__ */ 8 | 9 | int 10 | xeno_bind_skin_opt(unsigned skin_magic, const char *skin, const char *module); 11 | 12 | static inline int 13 | xeno_bind_skin(unsigned skin_magic, const char *skin, const char *module) 14 | { 15 | int muxid = xeno_bind_skin_opt(skin_magic, skin, module); 16 | 17 | if (muxid == -1) { 18 | fprintf(stderr, 19 | "Xenomai: %s skin or CONFIG_XENO_OPT_PERVASIVE disabled.\n" 20 | "(modprobe %s?)\n", skin, module); 21 | exit(EXIT_FAILURE); 22 | } 23 | 24 | return muxid; 25 | } 26 | 27 | #endif /* _XENO_ASM_GENERIC_BITS_BIND_H */ 28 | -------------------------------------------------------------------------------- /include/xenomai/asm-generic/xenomai/pci_ids.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_ASM_GENERIC_PCI_IDS_H 2 | #define _XENO_ASM_GENERIC_PCI_IDS_H 3 | 4 | #include 5 | 6 | /* SMI */ 7 | #ifndef PCI_DEVICE_ID_INTEL_ESB2_0 8 | #define PCI_DEVICE_ID_INTEL_ESB2_0 0x2670 9 | #endif 10 | #ifndef PCI_DEVICE_ID_INTEL_ICH7_0 11 | #define PCI_DEVICE_ID_INTEL_ICH7_0 0x27b8 12 | #endif 13 | #ifndef PCI_DEVICE_ID_INTEL_ICH7_1 14 | #define PCI_DEVICE_ID_INTEL_ICH7_1 0x27b9 15 | #endif 16 | #ifndef PCI_DEVICE_ID_INTEL_ICH8_4 17 | #define PCI_DEVICE_ID_INTEL_ICH8_4 0x2815 18 | #endif 19 | #ifndef PCI_DEVICE_ID_INTEL_ICH9_1 20 | #define PCI_DEVICE_ID_INTEL_ICH9_1 0x2917 21 | #endif 22 | #ifndef PCI_DEVICE_ID_INTEL_ICH9_5 23 | #define PCI_DEVICE_ID_INTEL_ICH9_5 0x2919 24 | #endif 25 | #ifndef PCI_DEVICE_ID_INTEL_ICH10_1 26 | #define PCI_DEVICE_ID_INTEL_ICH10_1 0x3a16 27 | #endif 28 | #ifndef PCI_DEVICE_ID_INTEL_PCH_LPC_MIN 29 | #define PCI_DEVICE_ID_INTEL_PCH_LPC_MIN 0x3b00 30 | #endif 31 | 32 | /* RTCAN */ 33 | #ifndef PCI_VENDOR_ID_ESDGMBH 34 | #define PCI_VENDOR_ID_ESDGMBH 0x12fe 35 | #endif 36 | #ifndef PCI_DEVICE_ID_PLX_9030 37 | #define PCI_DEVICE_ID_PLX_9030 0x9030 38 | #endif 39 | #ifndef PCI_DEVICE_ID_PLX_9056 40 | #define PCI_DEVICE_ID_PLX_9056 0x9056 41 | #endif 42 | 43 | #endif /* _XENO_ASM_GENERIC_PCI_IDS_H */ 44 | -------------------------------------------------------------------------------- /include/xenomai/asm-generic/xenomai/sem_heap.h: -------------------------------------------------------------------------------- 1 | #ifndef SEM_HEAP_H 2 | #define SEM_HEAP_H 3 | 4 | extern unsigned long xeno_sem_heap[2]; 5 | 6 | #endif /* SEM_HEAP_H */ 7 | -------------------------------------------------------------------------------- /include/xenomai/asm-generic/xenomai/sigshadow.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_ASM_GENERIC_BITS_SIGSHADOW_H 2 | #define _XENO_ASM_GENERIC_BITS_SIGSHADOW_H 3 | 4 | void xeno_sigshadow_install_once(void); 5 | 6 | #endif /* _XENO_ASM_GENERIC_BITS_SIGSHADOW_H */ 7 | -------------------------------------------------------------------------------- /include/xenomai/asm-generic/xenomai/stack.h: -------------------------------------------------------------------------------- 1 | #ifndef STACKSIZE_H 2 | #define STACKSIZE_H 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif /* __cplusplus */ 12 | 13 | static inline unsigned xeno_stacksize(unsigned size) 14 | { 15 | static const unsigned default_size = __WORDSIZE * 1024; 16 | static unsigned min_size; 17 | if (!min_size) 18 | min_size = PTHREAD_STACK_MIN + getpagesize(); 19 | 20 | if (!size) 21 | size = default_size; 22 | if (size < min_size) 23 | size = min_size; 24 | 25 | return size; 26 | } 27 | 28 | void xeno_fault_stack(void); 29 | 30 | #ifdef __cplusplus 31 | } 32 | #endif /* __cplusplus */ 33 | 34 | #endif /* STACKSIZE_H */ 35 | -------------------------------------------------------------------------------- /include/xenomai/asm-generic/xenomai/timeconv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010 Jan Kiszka . 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with this library; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. 17 | */ 18 | 19 | #ifndef _XENO_ASM_GENERIC_TIMECONV_H 20 | #define _XENO_ASM_GENERIC_TIMECONV_H 21 | 22 | #ifndef __KERNEL__ 23 | extern xnsysinfo_t sysinfo; 24 | 25 | void xeno_init_timeconv(int muxid); 26 | #endif 27 | 28 | long long xnarch_tsc_to_ns(long long ticks); 29 | long long xnarch_tsc_to_ns_rounded(long long ticks); 30 | long long xnarch_ns_to_tsc(long long ns); 31 | 32 | #endif /* !_XENO_ASM_GENERIC_TIMECONV_H */ 33 | -------------------------------------------------------------------------------- /include/xenomai/asm-nios2/bits/bind.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_ASM_NIOS2_BIND_H 2 | #define _XENO_ASM_NIOS2_BIND_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | #include 14 | 15 | volatile void *xeno_nios2_hrclock = NULL; 16 | 17 | static inline void xeno_nios2_features_check(struct xnfeatinfo *finfo) 18 | { 19 | unsigned long pa = finfo->feat_arch.hrclock_membase; 20 | unsigned int pagesz; 21 | void *p; 22 | int fd; 23 | 24 | fd = open("/dev/mem", O_RDWR | O_SYNC); 25 | if (fd == -1) { 26 | perror("Xenomai init: open(/dev/mem)"); 27 | exit(EXIT_FAILURE); 28 | } 29 | 30 | pagesz = sysconf(_SC_PAGESIZE); 31 | p = mmap(NULL, pagesz, PROT_READ | PROT_WRITE, MAP_SHARED, fd, pa & ~(pagesz - 1)); 32 | if (p == MAP_FAILED) { 33 | perror("Xenomai init: mmap(/dev/mem)"); 34 | exit(EXIT_FAILURE); 35 | } 36 | close(fd); 37 | 38 | xeno_nios2_hrclock = (volatile void *)(p + (pa & (pagesz - 1))); 39 | } 40 | 41 | #define xeno_arch_features_check(finfo) xeno_nios2_features_check(finfo) 42 | 43 | #endif /* _XENO_ASM_NIOS2_BIND_H */ 44 | -------------------------------------------------------------------------------- /include/xenomai/asm-nios2/bits/heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_ASM_NIOS2_BITS_HEAP_H 21 | #define _XENO_ASM_NIOS2_BITS_HEAP_H 22 | 23 | #include 24 | 25 | #endif /* !_XENO_ASM_NIOS2_BITS_HEAP_H */ 26 | -------------------------------------------------------------------------------- /include/xenomai/asm-nios2/bits/intr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_ASM_NIOS2_BITS_INTR_H 21 | #define _XENO_ASM_NIOS2_BITS_INTR_H 22 | 23 | #include 24 | 25 | static inline void xnarch_relay_tick(void) 26 | { 27 | /* 28 | * We have a dedicated timer on this arch, so no need for 29 | * piggybacking the kernel timer. 30 | */ 31 | } 32 | 33 | #endif /* !_XENO_ASM_NIOS2_BITS_INTR_H */ 34 | -------------------------------------------------------------------------------- /include/xenomai/asm-nios2/fptest.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_ASM_NIOS2_FPTEST_H 2 | #define _XENO_ASM_NIOS2_FPTEST_H 3 | 4 | #ifdef __KERNEL__ 5 | #include 6 | 7 | static inline int fp_kernel_supported(void) 8 | { 9 | return 0; 10 | } 11 | 12 | static inline int fp_linux_begin(void) 13 | { 14 | return -ENOSYS; 15 | } 16 | 17 | static inline void fp_linux_end(void) 18 | { 19 | } 20 | 21 | #else /* !__KERNEL__ */ 22 | #include 23 | #define printk printf 24 | #endif /* !__KERNEL__ */ 25 | 26 | static inline void fp_features_init(void) 27 | { 28 | } 29 | 30 | static inline void fp_regs_set(unsigned val) 31 | { 32 | } 33 | 34 | static inline unsigned fp_regs_check(unsigned val) 35 | { 36 | return val; 37 | } 38 | 39 | #endif /* _XENO_ASM_NIOS2_FPTEST_H */ 40 | -------------------------------------------------------------------------------- /include/xenomai/asm-powerpc/bits/bind.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_ASM_POWERPC_BIND_H 2 | #define _XENO_ASM_POWERPC_BIND_H 3 | 4 | #include 5 | 6 | #endif /* _XENO_ASM_POWERPC_BIND_H */ 7 | -------------------------------------------------------------------------------- /include/xenomai/asm-powerpc/bits/heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003,2004 Philippe Gerum . 3 | * 4 | * 64-bit PowerPC adoption 5 | * copyright (C) 2005 Taneli Vähäkangas and Heikki Lindholm 6 | * 7 | * Xenomai is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * Xenomai is distributed in the hope that it will be useful, but 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with Xenomai; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | * 02111-1307, USA. 21 | */ 22 | 23 | #ifndef _XENO_ASM_POWERPC_BITS_HEAP_H 24 | #define _XENO_ASM_POWERPC_BITS_HEAP_H 25 | 26 | #include 27 | 28 | #endif /* !_XENO_ASM_POWERPC_BITS_HEAP_H */ 29 | -------------------------------------------------------------------------------- /include/xenomai/asm-sh/arith.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_ASM_SH_ARITH_H 21 | #define _XENO_ASM_SH_ARITH_H 22 | 23 | #include 24 | 25 | #define __rthal_add96and64(l0, l1, l2, s0, s1) \ 26 | do { \ 27 | __asm__ ("clrt\n\t" \ 28 | "addc %4, %2\n\t" \ 29 | "addc %3, %1\n\t" \ 30 | "addc %5, %0\n\t" \ 31 | : "+r"(l0), "+r"(l1), "+r"(l2) \ 32 | : "r"(s0), "r"(s1), "r" (0) : "t"); \ 33 | } while (0) 34 | 35 | #include 36 | 37 | #endif /* _XENO_ASM_SH_ARITH_H */ 38 | -------------------------------------------------------------------------------- /include/xenomai/asm-sh/bits/heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_ASM_SH_BITS_HEAP_H 21 | #define _XENO_ASM_SH_BITS_HEAP_H 22 | 23 | #include 24 | 25 | #endif /* !_XENO_ASM_SH_BITS_HEAP_H */ 26 | -------------------------------------------------------------------------------- /include/xenomai/asm-sh/bits/intr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_ASM_SH_BITS_INTR_H 21 | #define _XENO_ASM_SH_BITS_INTR_H 22 | 23 | #include 24 | 25 | static inline void xnarch_relay_tick(void) 26 | { 27 | rthal_irq_host_pend(RTHAL_TIMER_IRQ); 28 | } 29 | 30 | #endif /* !_XENO_ASM_SH_BITS_INTR_H */ 31 | -------------------------------------------------------------------------------- /include/xenomai/asm-sh/fptest.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_ASM_SH_FPTEST_H 2 | #define _XENO_ASM_SH_FPTEST_H 3 | 4 | #ifdef __KERNEL__ 5 | #include 6 | 7 | static inline int fp_kernel_supported(void) 8 | { 9 | return 0; 10 | } 11 | 12 | static inline int fp_linux_begin(void) 13 | { 14 | return -ENOSYS; 15 | } 16 | 17 | static inline void fp_linux_end(void) 18 | { 19 | } 20 | 21 | #else /* !__KERNEL__ */ 22 | #include 23 | #define printk printf 24 | #endif /* !__KERNEL__ */ 25 | 26 | static inline void fp_features_init(void) 27 | { 28 | } 29 | 30 | static inline void fp_regs_set(unsigned val) 31 | { 32 | } 33 | 34 | static inline unsigned fp_regs_check(unsigned val) 35 | { 36 | return val; 37 | } 38 | 39 | #endif /* _XENO_ASM_SH_FPTEST_H */ 40 | -------------------------------------------------------------------------------- /include/xenomai/asm-sim/atomic.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * This program is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU General Public License as 6 | * published by the Free Software Foundation; either version 2 of the 7 | * License, or (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | * 18 | * This file implements the interface between the Xenomai nucleus and 19 | * the Minute Virtual Machine. 20 | */ 21 | 22 | #ifndef _XENO_ASM_SIM_ATOMIC_H 23 | #define _XENO_ASM_SIM_ATOMIC_H 24 | 25 | typedef unsigned long xnarch_atomic_t; 26 | 27 | unsigned long mvm_atomic_cmpxchg(unsigned long *p, 28 | unsigned long o, unsigned long n); 29 | 30 | #define xnarch_atomic_cmpxchg(p,o,n) \ 31 | mvm_atomic_cmpxchg(p, o, n) 32 | 33 | #endif /* _XENO_ASM_SIM_ATOMIC_H */ 34 | -------------------------------------------------------------------------------- /include/xenomai/asm-sim/bits/heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * This program is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU General Public License as 6 | * published by the Free Software Foundation; either version 2 of the 7 | * License, or (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef _XENO_ASM_SIM_BITS_HEAP_H 20 | #define _XENO_ASM_SIM_BITS_HEAP_H 21 | 22 | /* Empty */ 23 | 24 | #endif /* !_XENO_ASM_SIM_BITS_HEAP_H */ 25 | -------------------------------------------------------------------------------- /include/xenomai/asm-sim/bits/sched.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 Philippe Gerum . 3 | * 4 | * This program is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU General Public License as 6 | * published by the Free Software Foundation; either version 2 of the 7 | * License, or (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef _XENO_ASM_SIM_BITS_SCHED_H 20 | #define _XENO_ASM_SIM_BITS_SCHED_H 21 | 22 | #ifdef __IN_XENO__ 23 | 24 | static inline void xnarch_init_root_tcb (xnarchtcb_t *tcb, 25 | struct xnthread *thread, 26 | const char *name) 27 | { 28 | tcb->vmthread = mvm_thread_self(); 29 | } 30 | 31 | #else 32 | 33 | #include_next 34 | 35 | #endif 36 | 37 | #endif /* !_XENO_ASM_SIM_BITS_SCHED_H */ 38 | -------------------------------------------------------------------------------- /include/xenomai/asm-sim/bits/thread.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * This program is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU General Public License as 6 | * published by the Free Software Foundation; either version 2 of the 7 | * License, or (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef _XENO_ASM_SIM_BITS_THREAD_H 20 | #define _XENO_ASM_SIM_BITS_THREAD_H 21 | 22 | static inline void xnarch_init_tcb (xnarchtcb_t *tcb) 23 | { 24 | tcb->vmthread = NULL; 25 | } 26 | 27 | #define xnarch_alloc_stack(tcb,stacksize) 0 28 | #define xnarch_free_stack(tcb) do { } while(0) 29 | 30 | #endif /* !_XENO_ASM_SIM_BITS_THREAD_H */ 31 | -------------------------------------------------------------------------------- /include/xenomai/asm-sim/bits/timer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * This program is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU General Public License as 6 | * published by the Free Software Foundation; either version 2 of the 7 | * License, or (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef _XENO_ASM_SIM_BITS_TIMER_H 20 | #define _XENO_ASM_SIM_BITS_TIMER_H 21 | 22 | static inline void xnarch_program_timer_shot (unsigned long delay) 23 | { 24 | /* 1 tsc unit of the virtual CPU == 1 ns. */ 25 | mvm_program_timer(delay ?: 1); 26 | } 27 | 28 | static inline void xnarch_send_timer_ipi (xnarch_cpumask_t mask) 29 | { 30 | } 31 | 32 | #endif /* !_XENO_ASM_SIM_BITS_TIMER_H */ 33 | -------------------------------------------------------------------------------- /include/xenomai/asm-sim/xenomai: -------------------------------------------------------------------------------- 1 | IntxLNK. -------------------------------------------------------------------------------- /include/xenomai/asm-x86/arith.h: -------------------------------------------------------------------------------- 1 | #ifdef __i386__ 2 | #include "arith_32.h" 3 | #else 4 | #include "arith_64.h" 5 | #endif 6 | -------------------------------------------------------------------------------- /include/xenomai/asm-x86/bits/bind.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_ASM_X86_BIND_H 2 | #define _XENO_ASM_X86_BIND_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #include 10 | #include 11 | 12 | #ifdef __i386__ 13 | static inline void xeno_x86_features_check(struct xnfeatinfo *finfo) 14 | { 15 | #ifdef CONFIG_XENO_X86_SEP 16 | size_t n = confstr(_CS_GNU_LIBPTHREAD_VERSION, NULL, 0); 17 | if (n > 0) { 18 | char buf[n]; 19 | 20 | confstr (_CS_GNU_LIBPTHREAD_VERSION, buf, n); 21 | 22 | if (strstr (buf, "NPTL")) 23 | return; 24 | } 25 | 26 | fprintf(stderr, 27 | "Xenomai: --enable-x86-sep needs NPTL and Linux 2.6.x or higher,\n" 28 | "which does not match your configuration. Please upgrade, or\n" 29 | "rebuild the user-space support passing --disable-x86-sep.\n"); 30 | exit(1); 31 | #endif /* CONFIG_XENO_X86_SEP */ 32 | } 33 | #define xeno_arch_features_check(finfo) xeno_x86_features_check(finfo) 34 | 35 | #endif /* __i386__ */ 36 | 37 | #endif /* _XENO_ASM_X86_BIND_H */ 38 | -------------------------------------------------------------------------------- /include/xenomai/asm-x86/bits/heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_ASM_X86_BITS_HEAP_H 21 | #define _XENO_ASM_X86_BITS_HEAP_H 22 | 23 | #include 24 | 25 | #endif /* !_XENO_ASM_X86_BITS_HEAP_H */ 26 | -------------------------------------------------------------------------------- /include/xenomai/asm-x86/bits/intr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_ASM_X86_BITS_INTR_H 21 | #define _XENO_ASM_X86_BITS_INTR_H 22 | 23 | #include 24 | 25 | static inline void xnarch_relay_tick(void) 26 | { 27 | rthal_irq_host_pend(RTHAL_HOST_TICK_IRQ); 28 | } 29 | 30 | #endif /* !_XENO_ASM_X86_BITS_INTR_H */ 31 | -------------------------------------------------------------------------------- /include/xenomai/asm-x86/features.h: -------------------------------------------------------------------------------- 1 | #ifdef __i386__ 2 | #include "features_32.h" 3 | #else 4 | #include "features_64.h" 5 | #endif 6 | -------------------------------------------------------------------------------- /include/xenomai/asm-x86/switch.h: -------------------------------------------------------------------------------- 1 | #ifdef __i386__ 2 | #include "switch_32.h" 3 | #else 4 | #include "switch_64.h" 5 | #endif 6 | -------------------------------------------------------------------------------- /include/xenomai/asm-x86/wrappers.h: -------------------------------------------------------------------------------- 1 | #ifdef __i386__ 2 | #include "wrappers_32.h" 3 | #else 4 | #include "wrappers_64.h" 5 | #endif 6 | -------------------------------------------------------------------------------- /include/xenomai/asm/bits/heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003,2004 Philippe Gerum . 3 | * 4 | * ARM port 5 | * Copyright (C) 2005 Stelian Pop 6 | * 7 | * Xenomai is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * Xenomai is distributed in the hope that it will be useful, but 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with Xenomai; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | * 02111-1307, USA. 21 | */ 22 | 23 | #ifndef _XENO_ASM_ARM_BITS_HEAP_H 24 | #define _XENO_ASM_ARM_BITS_HEAP_H 25 | 26 | #include 27 | 28 | #endif /* !_XENO_ASM_ARM_BITS_HEAP_H */ 29 | -------------------------------------------------------------------------------- /include/xenomai/asm/bits/intr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003,2004 Philippe Gerum . 3 | * 4 | * ARM port 5 | * Copyright (C) 2005 Stelian Pop 6 | * 7 | * Xenomai is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * Xenomai is distributed in the hope that it will be useful, but 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with Xenomai; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | * 02111-1307, USA. 21 | */ 22 | 23 | #ifndef _XENO_ASM_ARM_BITS_INTR_H 24 | #define _XENO_ASM_ARM_BITS_INTR_H 25 | 26 | #include 27 | 28 | static inline void xnarch_relay_tick(void) 29 | { 30 | rthal_irq_host_pend(RTHAL_TIMER_IRQ); 31 | } 32 | 33 | #endif /* !_XENO_ASM_ARM_BITS_INTR_H */ 34 | -------------------------------------------------------------------------------- /include/xenomai/nucleus/ppd.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_NUCLEUS_PPD_H 2 | #define _XENO_NUCLEUS_PPD_H 3 | 4 | #include 5 | #include 6 | 7 | struct mm_struct; 8 | 9 | typedef struct xnshadow_ppd_key { 10 | unsigned long muxid; 11 | struct mm_struct *mm; 12 | } xnshadow_ppd_key_t; 13 | 14 | typedef struct xnshadow_ppd_t { 15 | xnshadow_ppd_key_t key; 16 | xnholder_t link; 17 | #define link2ppd(ln) container_of(ln, xnshadow_ppd_t, link) 18 | } xnshadow_ppd_t; 19 | 20 | #define xnshadow_ppd_muxid(ppd) ((ppd)->key.muxid) 21 | 22 | #define xnshadow_ppd_mm(ppd) ((ppd)->key.mm) 23 | 24 | /* Call with nklock locked irqs off. */ 25 | xnshadow_ppd_t *xnshadow_ppd_get(unsigned muxid); 26 | 27 | #endif /* _XENO_NUCLEUS_PPD_H */ 28 | -------------------------------------------------------------------------------- /include/xenomai/nucleus/sys_ppd.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_NUCLEUS_SYS_PPD_H 2 | #define _XENO_NUCLEUS_SYS_PPD_H 3 | 4 | #include 5 | #include 6 | 7 | struct xnsys_ppd { 8 | xnshadow_ppd_t ppd; 9 | xnheap_t sem_heap; 10 | #ifdef XNARCH_HAVE_MAYDAY 11 | unsigned long mayday_addr; 12 | #endif 13 | xnarch_atomic_t refcnt; 14 | #define ppd2sys(addr) container_of(addr, struct xnsys_ppd, ppd) 15 | }; 16 | 17 | extern struct xnsys_ppd __xnsys_global_ppd; 18 | 19 | #ifdef CONFIG_XENO_OPT_PERVASIVE 20 | 21 | static inline struct xnsys_ppd *xnsys_ppd_get(int global) 22 | { 23 | xnshadow_ppd_t *ppd; 24 | 25 | if (global || !(ppd = xnshadow_ppd_get(0))) 26 | return &__xnsys_global_ppd; 27 | 28 | return ppd2sys(ppd); 29 | } 30 | 31 | #else /* !CONFIG_XENO_OPT_PERVASIVE */ 32 | 33 | static inline struct xnsys_ppd *xnsys_ppd_get(int global) 34 | { 35 | return &__xnsys_global_ppd; 36 | } 37 | 38 | #endif /* !CONFIG_XENO_OPT_PERVASIVE */ 39 | 40 | #endif /* _XENO_NUCLEUS_SYS_PPD_H */ 41 | -------------------------------------------------------------------------------- /include/xenomai/nucleus/system.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published 6 | * by the Free Software Foundation; either version 2 of the License, 7 | * or (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_NUCLEUS_SYSTEM_H 21 | #define _XENO_NUCLEUS_SYSTEM_H 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | #endif /* !_XENO_NUCLEUS_SYSTEM_H */ 30 | -------------------------------------------------------------------------------- /include/xenomai/nucleus/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published 6 | * by the Free Software Foundation; either version 2 of the License, 7 | * or (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_NUCLEUS_VERSION_H 21 | #define _XENO_NUCLEUS_VERSION_H 22 | 23 | #define XENO_VERSION(maj,min,rev) (((maj)<<16)|((min)<<8)|(rev)) 24 | 25 | #define XENO_VERSION_CODE XENO_VERSION(CONFIG_XENO_VERSION_MAJOR, \ 26 | CONFIG_XENO_VERSION_MINOR, \ 27 | CONFIG_XENO_REVISION_LEVEL) 28 | 29 | #define XENO_VERSION_NAME "Lies and Truths" 30 | 31 | #define XENO_VERSION_STRING "2.6.3" 32 | 33 | #endif /* _XENO_NUCLEUS_VERSION_H */ 34 | -------------------------------------------------------------------------------- /include/xenomai/nucleus/xenomai.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published 6 | * by the Free Software Foundation; either version 2 of the License, 7 | * or (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_NUCLEUS_XENOMAI_H 21 | #define _XENO_NUCLEUS_XENOMAI_H 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | 30 | #endif /* !_XENO_NUCLEUS_XENOMAI_H */ 31 | -------------------------------------------------------------------------------- /include/xenomai/posix/stdio.h: -------------------------------------------------------------------------------- 1 | #ifndef __KERNEL__ 2 | 3 | #pragma GCC system_header 4 | 5 | #include_next 6 | 7 | #ifndef _XENO_POSIX_STDIO_H 8 | #define _XENO_POSIX_STDIO_H 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif /* __cplusplus */ 17 | 18 | int __real_vfprintf(FILE *stream, const char *fmt, va_list args); 19 | 20 | #ifdef CONFIG_XENO_FORTIFY 21 | int __real___vfprintf_chk(FILE *stream, int level, const char *fmt, va_list ap); 22 | #endif 23 | 24 | int __real_vprintf(const char *fmt, va_list args); 25 | 26 | int __real_fprintf(FILE *stream, const char *fmt, ...); 27 | 28 | int __real_printf(const char *fmt, ...); 29 | 30 | int __real_puts(const char *s); 31 | 32 | int __real_fputs(const char *s, FILE *stream); 33 | 34 | int __real_fputc(int c, FILE *stream); 35 | 36 | int __real_putchar(int c); 37 | 38 | size_t __real_fwrite(const void *ptr, size_t sz, size_t nmemb, FILE *stream); 39 | 40 | #ifdef __cplusplus 41 | } 42 | #endif /* __cplusplus */ 43 | 44 | #endif /* _XENO_POSIX_STDIO_H */ 45 | 46 | #endif /* !__KERNEL__ */ 47 | -------------------------------------------------------------------------------- /include/xenomai/posix/sys/ioctl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005 Philippe Gerum . 3 | * 4 | * This program is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU General Public License as 6 | * published by the Free Software Foundation; either version 2 of the 7 | * License, or (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef _XENO_POSIX_SYS_IOCTL_H 20 | #define _XENO_POSIX_SYS_IOCTL_H 21 | 22 | #if !(defined(__KERNEL__) || defined(__XENO_SIM__)) 23 | 24 | #pragma GCC system_header 25 | 26 | #include_next 27 | 28 | #ifdef __cplusplus 29 | extern "C" { 30 | #endif 31 | 32 | int __real_ioctl(int fildes, int request, ...); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif /* !(__KERNEL__ || __XENO_SIM__) */ 39 | 40 | #endif /* _XENO_POSIX_SYS_IOCTL_H */ 41 | -------------------------------------------------------------------------------- /include/xenomai/posix/sys/select.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_POSIX_SELECT_H 2 | #define _XENO_POSIX_SELECT_H 3 | 4 | #if !(defined(__KERNEL__) || defined(__XENO_SIM__)) 5 | 6 | #pragma GCC system_header 7 | 8 | #include_next 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | extern int __real_select (int __nfds, fd_set *__restrict __readfds, 15 | fd_set *__restrict __writefds, 16 | fd_set *__restrict __exceptfds, 17 | struct timeval *__restrict __timeout); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | #endif /* !(__KERNEL__ || __XENO_SIM__) */ 24 | 25 | #endif /* _XENO_POSIX_SELECT_H */ 26 | -------------------------------------------------------------------------------- /include/xenomai/posix/syslog.h: -------------------------------------------------------------------------------- 1 | #ifndef SYSLOG_H 2 | #define SYSLOG_H 3 | 4 | #pragma GCC system_header 5 | 6 | #include 7 | #include_next 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif /* __cplusplus */ 13 | 14 | void __real_syslog(int priority, const char *fmt, ...); 15 | 16 | void __real_vsyslog(int priority, const char *fmt, va_list ap); 17 | 18 | #ifdef CONFIG_XENO_FORTIFY 19 | void __real___vsyslog_chk(int priority, int level, const char *fmt, va_list ap); 20 | #endif 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif /* __cplusplus */ 25 | 26 | #endif /* SYSLOG_H */ 27 | -------------------------------------------------------------------------------- /include/xenomai/psos+/asr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published 6 | * by the Free Software Foundation; either version 2 of the License, 7 | * or (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _PSOS_ASR_H 21 | #define _PSOS_ASR_H 22 | 23 | #include 24 | #include 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | void psosasr_init(void); 31 | 32 | void psosasr_cleanup(void); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif /* !_PSOS_ASR_ */ 39 | -------------------------------------------------------------------------------- /include/xenomai/psos+/event.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published 6 | * by the Free Software Foundation; either version 2 of the License, 7 | * or (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _PSOS_EVENT_H 21 | #define _PSOS_EVENT_H 22 | 23 | #include 24 | #include 25 | 26 | typedef struct psosevent { 27 | 28 | u_long events; /* Event flags */ 29 | 30 | xnsynch_t synchbase; 31 | 32 | } psosevent_t; 33 | 34 | #ifdef __cplusplus 35 | extern "C" { 36 | #endif 37 | 38 | void taskev_init(psosevent_t *evgroup); 39 | 40 | void taskev_destroy(psosevent_t *evgroup); 41 | 42 | #ifdef __cplusplus 43 | } 44 | #endif 45 | 46 | #endif /* !_PSOS_EVENT_H */ 47 | -------------------------------------------------------------------------------- /include/xenomai/psos+/long_names.h: -------------------------------------------------------------------------------- 1 | #ifndef LONG_NAMES_H 2 | #define LONG_NAMES_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif /* __cplusplus */ 7 | 8 | const char *__psos_maybe_short_name(char shrt[5], const char *lng); 9 | 10 | #ifdef __cplusplus 11 | } 12 | #endif /* __cplusplus */ 13 | 14 | #endif /* LONG_NAMES_H */ 15 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/asm-powerpc/bits/bind.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_ASM_POWERPC_BIND_H 2 | #define _XENO_ASM_POWERPC_BIND_H 3 | 4 | #include 5 | 6 | #endif /* _XENO_ASM_POWERPC_BIND_H */ 7 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/asm-powerpc/bits/heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003,2004 Philippe Gerum . 3 | * 4 | * 64-bit PowerPC adoption 5 | * copyright (C) 2005 Taneli Vähäkangas and Heikki Lindholm 6 | * 7 | * Xenomai is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * Xenomai is distributed in the hope that it will be useful, but 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with Xenomai; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | * 02111-1307, USA. 21 | */ 22 | 23 | #ifndef _XENO_ASM_POWERPC_BITS_HEAP_H 24 | #define _XENO_ASM_POWERPC_BITS_HEAP_H 25 | 26 | #include 27 | 28 | #endif /* !_XENO_ASM_POWERPC_BITS_HEAP_H */ 29 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/asm-sh/arith.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_ASM_SH_ARITH_H 21 | #define _XENO_ASM_SH_ARITH_H 22 | 23 | #include 24 | 25 | #define __rthal_add96and64(l0, l1, l2, s0, s1) \ 26 | do { \ 27 | __asm__ ("clrt\n\t" \ 28 | "addc %4, %2\n\t" \ 29 | "addc %3, %1\n\t" \ 30 | "addc %5, %0\n\t" \ 31 | : "+r"(l0), "+r"(l1), "+r"(l2) \ 32 | : "r"(s0), "r"(s1), "r" (0) : "t"); \ 33 | } while (0) 34 | 35 | #include 36 | 37 | #endif /* _XENO_ASM_SH_ARITH_H */ 38 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/asm-sh/bits/heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_ASM_SH_BITS_HEAP_H 21 | #define _XENO_ASM_SH_BITS_HEAP_H 22 | 23 | #include 24 | 25 | #endif /* !_XENO_ASM_SH_BITS_HEAP_H */ 26 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/asm-sh/bits/intr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_ASM_SH_BITS_INTR_H 21 | #define _XENO_ASM_SH_BITS_INTR_H 22 | 23 | #include 24 | 25 | static inline void xnarch_relay_tick(void) 26 | { 27 | rthal_irq_host_pend(RTHAL_TIMER_IRQ); 28 | } 29 | 30 | #endif /* !_XENO_ASM_SH_BITS_INTR_H */ 31 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/asm-sh/fptest.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_ASM_SH_FPTEST_H 2 | #define _XENO_ASM_SH_FPTEST_H 3 | 4 | #ifdef __KERNEL__ 5 | #include 6 | 7 | static inline int fp_kernel_supported(void) 8 | { 9 | return 0; 10 | } 11 | 12 | static inline int fp_linux_begin(void) 13 | { 14 | return -ENOSYS; 15 | } 16 | 17 | static inline void fp_linux_end(void) 18 | { 19 | } 20 | 21 | #else /* !__KERNEL__ */ 22 | #include 23 | #define printk printf 24 | #endif /* !__KERNEL__ */ 25 | 26 | static inline void fp_features_init(void) 27 | { 28 | } 29 | 30 | static inline void fp_regs_set(unsigned val) 31 | { 32 | } 33 | 34 | static inline unsigned fp_regs_check(unsigned val) 35 | { 36 | return val; 37 | } 38 | 39 | #endif /* _XENO_ASM_SH_FPTEST_H */ 40 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/asm-sim/atomic.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * This program is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU General Public License as 6 | * published by the Free Software Foundation; either version 2 of the 7 | * License, or (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | * 18 | * This file implements the interface between the Xenomai nucleus and 19 | * the Minute Virtual Machine. 20 | */ 21 | 22 | #ifndef _XENO_ASM_SIM_ATOMIC_H 23 | #define _XENO_ASM_SIM_ATOMIC_H 24 | 25 | typedef unsigned long xnarch_atomic_t; 26 | 27 | unsigned long mvm_atomic_cmpxchg(unsigned long *p, 28 | unsigned long o, unsigned long n); 29 | 30 | #define xnarch_atomic_cmpxchg(p,o,n) \ 31 | mvm_atomic_cmpxchg(p, o, n) 32 | 33 | #endif /* _XENO_ASM_SIM_ATOMIC_H */ 34 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/asm-sim/bits/heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * This program is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU General Public License as 6 | * published by the Free Software Foundation; either version 2 of the 7 | * License, or (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef _XENO_ASM_SIM_BITS_HEAP_H 20 | #define _XENO_ASM_SIM_BITS_HEAP_H 21 | 22 | /* Empty */ 23 | 24 | #endif /* !_XENO_ASM_SIM_BITS_HEAP_H */ 25 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/asm-sim/bits/sched.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 Philippe Gerum . 3 | * 4 | * This program is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU General Public License as 6 | * published by the Free Software Foundation; either version 2 of the 7 | * License, or (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef _XENO_ASM_SIM_BITS_SCHED_H 20 | #define _XENO_ASM_SIM_BITS_SCHED_H 21 | 22 | #ifdef __IN_XENO__ 23 | 24 | static inline void xnarch_init_root_tcb (xnarchtcb_t *tcb, 25 | struct xnthread *thread, 26 | const char *name) 27 | { 28 | tcb->vmthread = mvm_thread_self(); 29 | } 30 | 31 | #else 32 | 33 | #include_next 34 | 35 | #endif 36 | 37 | #endif /* !_XENO_ASM_SIM_BITS_SCHED_H */ 38 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/asm-sim/bits/thread.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * This program is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU General Public License as 6 | * published by the Free Software Foundation; either version 2 of the 7 | * License, or (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef _XENO_ASM_SIM_BITS_THREAD_H 20 | #define _XENO_ASM_SIM_BITS_THREAD_H 21 | 22 | static inline void xnarch_init_tcb (xnarchtcb_t *tcb) 23 | { 24 | tcb->vmthread = NULL; 25 | } 26 | 27 | #define xnarch_alloc_stack(tcb,stacksize) 0 28 | #define xnarch_free_stack(tcb) do { } while(0) 29 | 30 | #endif /* !_XENO_ASM_SIM_BITS_THREAD_H */ 31 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/asm-sim/bits/timer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * This program is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU General Public License as 6 | * published by the Free Software Foundation; either version 2 of the 7 | * License, or (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef _XENO_ASM_SIM_BITS_TIMER_H 20 | #define _XENO_ASM_SIM_BITS_TIMER_H 21 | 22 | static inline void xnarch_program_timer_shot (unsigned long delay) 23 | { 24 | /* 1 tsc unit of the virtual CPU == 1 ns. */ 25 | mvm_program_timer(delay ?: 1); 26 | } 27 | 28 | static inline void xnarch_send_timer_ipi (xnarch_cpumask_t mask) 29 | { 30 | } 31 | 32 | #endif /* !_XENO_ASM_SIM_BITS_TIMER_H */ 33 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/asm-x86/arith.h: -------------------------------------------------------------------------------- 1 | #ifdef __i386__ 2 | #include "arith_32.h" 3 | #else 4 | #include "arith_64.h" 5 | #endif 6 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/asm-x86/bits/bind.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_ASM_X86_BIND_H 2 | #define _XENO_ASM_X86_BIND_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #include 10 | #include 11 | 12 | #ifdef __i386__ 13 | static inline void xeno_x86_features_check(struct xnfeatinfo *finfo) 14 | { 15 | #ifdef CONFIG_XENO_X86_SEP 16 | size_t n = confstr(_CS_GNU_LIBPTHREAD_VERSION, NULL, 0); 17 | if (n > 0) { 18 | char buf[n]; 19 | 20 | confstr (_CS_GNU_LIBPTHREAD_VERSION, buf, n); 21 | 22 | if (strstr (buf, "NPTL")) 23 | return; 24 | } 25 | 26 | fprintf(stderr, 27 | "Xenomai: --enable-x86-sep needs NPTL and Linux 2.6.x or higher,\n" 28 | "which does not match your configuration. Please upgrade, or\n" 29 | "rebuild the user-space support passing --disable-x86-sep.\n"); 30 | exit(1); 31 | #endif /* CONFIG_XENO_X86_SEP */ 32 | } 33 | #define xeno_arch_features_check(finfo) xeno_x86_features_check(finfo) 34 | 35 | #endif /* __i386__ */ 36 | 37 | #endif /* _XENO_ASM_X86_BIND_H */ 38 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/asm-x86/bits/heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_ASM_X86_BITS_HEAP_H 21 | #define _XENO_ASM_X86_BITS_HEAP_H 22 | 23 | #include 24 | 25 | #endif /* !_XENO_ASM_X86_BITS_HEAP_H */ 26 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/asm-x86/bits/intr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_ASM_X86_BITS_INTR_H 21 | #define _XENO_ASM_X86_BITS_INTR_H 22 | 23 | #include 24 | 25 | static inline void xnarch_relay_tick(void) 26 | { 27 | rthal_irq_host_pend(RTHAL_HOST_TICK_IRQ); 28 | } 29 | 30 | #endif /* !_XENO_ASM_X86_BITS_INTR_H */ 31 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/asm-x86/features.h: -------------------------------------------------------------------------------- 1 | #ifdef __i386__ 2 | #include "features_32.h" 3 | #else 4 | #include "features_64.h" 5 | #endif 6 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/asm-x86/switch.h: -------------------------------------------------------------------------------- 1 | #ifdef __i386__ 2 | #include "switch_32.h" 3 | #else 4 | #include "switch_64.h" 5 | #endif 6 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/asm-x86/wrappers.h: -------------------------------------------------------------------------------- 1 | #ifdef __i386__ 2 | #include "wrappers_32.h" 3 | #else 4 | #include "wrappers_64.h" 5 | #endif 6 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/nucleus/ppd.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_NUCLEUS_PPD_H 2 | #define _XENO_NUCLEUS_PPD_H 3 | 4 | #include 5 | #include 6 | 7 | struct mm_struct; 8 | 9 | typedef struct xnshadow_ppd_key { 10 | unsigned long muxid; 11 | struct mm_struct *mm; 12 | } xnshadow_ppd_key_t; 13 | 14 | typedef struct xnshadow_ppd_t { 15 | xnshadow_ppd_key_t key; 16 | xnholder_t link; 17 | #define link2ppd(ln) container_of(ln, xnshadow_ppd_t, link) 18 | } xnshadow_ppd_t; 19 | 20 | #define xnshadow_ppd_muxid(ppd) ((ppd)->key.muxid) 21 | 22 | #define xnshadow_ppd_mm(ppd) ((ppd)->key.mm) 23 | 24 | /* Call with nklock locked irqs off. */ 25 | xnshadow_ppd_t *xnshadow_ppd_get(unsigned muxid); 26 | 27 | #endif /* _XENO_NUCLEUS_PPD_H */ 28 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/nucleus/sys_ppd.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_NUCLEUS_SYS_PPD_H 2 | #define _XENO_NUCLEUS_SYS_PPD_H 3 | 4 | #include 5 | #include 6 | 7 | struct xnsys_ppd { 8 | xnshadow_ppd_t ppd; 9 | xnheap_t sem_heap; 10 | #ifdef XNARCH_HAVE_MAYDAY 11 | unsigned long mayday_addr; 12 | #endif 13 | xnarch_atomic_t refcnt; 14 | #define ppd2sys(addr) container_of(addr, struct xnsys_ppd, ppd) 15 | }; 16 | 17 | extern struct xnsys_ppd __xnsys_global_ppd; 18 | 19 | #ifdef CONFIG_XENO_OPT_PERVASIVE 20 | 21 | static inline struct xnsys_ppd *xnsys_ppd_get(int global) 22 | { 23 | xnshadow_ppd_t *ppd; 24 | 25 | if (global || !(ppd = xnshadow_ppd_get(0))) 26 | return &__xnsys_global_ppd; 27 | 28 | return ppd2sys(ppd); 29 | } 30 | 31 | #else /* !CONFIG_XENO_OPT_PERVASIVE */ 32 | 33 | static inline struct xnsys_ppd *xnsys_ppd_get(int global) 34 | { 35 | return &__xnsys_global_ppd; 36 | } 37 | 38 | #endif /* !CONFIG_XENO_OPT_PERVASIVE */ 39 | 40 | #endif /* _XENO_NUCLEUS_SYS_PPD_H */ 41 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/nucleus/system.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published 6 | * by the Free Software Foundation; either version 2 of the License, 7 | * or (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_NUCLEUS_SYSTEM_H 21 | #define _XENO_NUCLEUS_SYSTEM_H 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | #endif /* !_XENO_NUCLEUS_SYSTEM_H */ 30 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/nucleus/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published 6 | * by the Free Software Foundation; either version 2 of the License, 7 | * or (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_NUCLEUS_VERSION_H 21 | #define _XENO_NUCLEUS_VERSION_H 22 | 23 | #define XENO_VERSION(maj,min,rev) (((maj)<<16)|((min)<<8)|(rev)) 24 | 25 | #define XENO_VERSION_CODE XENO_VERSION(CONFIG_XENO_VERSION_MAJOR, \ 26 | CONFIG_XENO_VERSION_MINOR, \ 27 | CONFIG_XENO_REVISION_LEVEL) 28 | 29 | #define XENO_VERSION_NAME "Lies and Truths" 30 | 31 | #define XENO_VERSION_STRING "2.6.3" 32 | 33 | #endif /* _XENO_NUCLEUS_VERSION_H */ 34 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/nucleus/xenomai.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published 6 | * by the Free Software Foundation; either version 2 of the License, 7 | * or (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_NUCLEUS_XENOMAI_H 21 | #define _XENO_NUCLEUS_XENOMAI_H 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | 30 | #endif /* !_XENO_NUCLEUS_XENOMAI_H */ 31 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/posix/stdio.h: -------------------------------------------------------------------------------- 1 | #ifndef __KERNEL__ 2 | 3 | #pragma GCC system_header 4 | 5 | #include_next 6 | 7 | #ifndef _XENO_POSIX_STDIO_H 8 | #define _XENO_POSIX_STDIO_H 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif /* __cplusplus */ 17 | 18 | int __real_vfprintf(FILE *stream, const char *fmt, va_list args); 19 | 20 | #ifdef CONFIG_XENO_FORTIFY 21 | int __real___vfprintf_chk(FILE *stream, int level, const char *fmt, va_list ap); 22 | #endif 23 | 24 | int __real_vprintf(const char *fmt, va_list args); 25 | 26 | int __real_fprintf(FILE *stream, const char *fmt, ...); 27 | 28 | int __real_printf(const char *fmt, ...); 29 | 30 | int __real_puts(const char *s); 31 | 32 | int __real_fputs(const char *s, FILE *stream); 33 | 34 | int __real_fputc(int c, FILE *stream); 35 | 36 | int __real_putchar(int c); 37 | 38 | size_t __real_fwrite(const void *ptr, size_t sz, size_t nmemb, FILE *stream); 39 | 40 | #ifdef __cplusplus 41 | } 42 | #endif /* __cplusplus */ 43 | 44 | #endif /* _XENO_POSIX_STDIO_H */ 45 | 46 | #endif /* !__KERNEL__ */ 47 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/posix/sys/ioctl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005 Philippe Gerum . 3 | * 4 | * This program is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU General Public License as 6 | * published by the Free Software Foundation; either version 2 of the 7 | * License, or (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef _XENO_POSIX_SYS_IOCTL_H 20 | #define _XENO_POSIX_SYS_IOCTL_H 21 | 22 | #if !(defined(__KERNEL__) || defined(__XENO_SIM__)) 23 | 24 | #pragma GCC system_header 25 | 26 | #include_next 27 | 28 | #ifdef __cplusplus 29 | extern "C" { 30 | #endif 31 | 32 | int __real_ioctl(int fildes, int request, ...); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif /* !(__KERNEL__ || __XENO_SIM__) */ 39 | 40 | #endif /* _XENO_POSIX_SYS_IOCTL_H */ 41 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/posix/sys/select.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_POSIX_SELECT_H 2 | #define _XENO_POSIX_SELECT_H 3 | 4 | #if !(defined(__KERNEL__) || defined(__XENO_SIM__)) 5 | 6 | #pragma GCC system_header 7 | 8 | #include_next 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | extern int __real_select (int __nfds, fd_set *__restrict __readfds, 15 | fd_set *__restrict __writefds, 16 | fd_set *__restrict __exceptfds, 17 | struct timeval *__restrict __timeout); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | #endif /* !(__KERNEL__ || __XENO_SIM__) */ 24 | 25 | #endif /* _XENO_POSIX_SELECT_H */ 26 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/posix/syslog.h: -------------------------------------------------------------------------------- 1 | #ifndef SYSLOG_H 2 | #define SYSLOG_H 3 | 4 | #pragma GCC system_header 5 | 6 | #include 7 | #include_next 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif /* __cplusplus */ 13 | 14 | void __real_syslog(int priority, const char *fmt, ...); 15 | 16 | void __real_vsyslog(int priority, const char *fmt, va_list ap); 17 | 18 | #ifdef CONFIG_XENO_FORTIFY 19 | void __real___vsyslog_chk(int priority, int level, const char *fmt, va_list ap); 20 | #endif 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif /* __cplusplus */ 25 | 26 | #endif /* SYSLOG_H */ 27 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/psos+/asr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published 6 | * by the Free Software Foundation; either version 2 of the License, 7 | * or (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _PSOS_ASR_H 21 | #define _PSOS_ASR_H 22 | 23 | #include 24 | #include 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | void psosasr_init(void); 31 | 32 | void psosasr_cleanup(void); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif /* !_PSOS_ASR_ */ 39 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/psos+/event.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published 6 | * by the Free Software Foundation; either version 2 of the License, 7 | * or (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _PSOS_EVENT_H 21 | #define _PSOS_EVENT_H 22 | 23 | #include 24 | #include 25 | 26 | typedef struct psosevent { 27 | 28 | u_long events; /* Event flags */ 29 | 30 | xnsynch_t synchbase; 31 | 32 | } psosevent_t; 33 | 34 | #ifdef __cplusplus 35 | extern "C" { 36 | #endif 37 | 38 | void taskev_init(psosevent_t *evgroup); 39 | 40 | void taskev_destroy(psosevent_t *evgroup); 41 | 42 | #ifdef __cplusplus 43 | } 44 | #endif 45 | 46 | #endif /* !_PSOS_EVENT_H */ 47 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/psos+/long_names.h: -------------------------------------------------------------------------------- 1 | #ifndef LONG_NAMES_H 2 | #define LONG_NAMES_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif /* __cplusplus */ 7 | 8 | const char *__psos_maybe_short_name(char shrt[5], const char *lng); 9 | 10 | #ifdef __cplusplus 11 | } 12 | #endif /* __cplusplus */ 13 | 14 | #endif /* LONG_NAMES_H */ 15 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/analogy/analogy_driver.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * Analogy for Linux, driver facilities 4 | * 5 | * Copyright (C) 1997-2000 David A. Schleef 6 | * Copyright (C) 2008 Alexis Berlemont 7 | * 8 | * Xenomai is free software; you can redistribute it and/or modify it 9 | * under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Xenomai is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Xenomai; if not, write to the Free Software Foundation, 20 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 | */ 22 | 23 | #ifndef __ANALOGY_ANALOGY_DRIVER__ 24 | #define __ANALOGY_ANALOGY_DRIVER__ 25 | 26 | #ifndef __KERNEL__ 27 | #error This header is for kernel space usage only. \ 28 | You are likely looking for ... 29 | #endif /* !__KERNEL__ */ 30 | 31 | #include 32 | #include 33 | #include 34 | 35 | #endif /* __ANALOGY_ANALOGY_DRIVER__ */ 36 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/analogy/types.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * Analogy for Linux, misc declarations 4 | * 5 | * Copyright (C) 1997-2000 David A. Schleef 6 | * Copyright (C) 2008 Alexis Berlemont 7 | * 8 | * Xenomai is free software; you can redistribute it and/or modify it 9 | * under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Xenomai is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Xenomai; if not, write to the Free Software Foundation, 20 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 | */ 22 | 23 | #ifndef __ANALOGY_TYPES__ 24 | #define __ANALOGY_TYPES__ 25 | 26 | #ifndef DOXYGEN_CPP 27 | 28 | /* --- Misc precompilation constant --- */ 29 | #define A4L_NAMELEN 20 30 | 31 | /* --- Common Analogy types --- */ 32 | 33 | typedef unsigned short sampl_t; 34 | typedef unsigned long lsampl_t; 35 | 36 | #endif /* !DOXYGEN_CPP */ 37 | 38 | #endif /* __ANALOGY_TYPES__ */ 39 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/asm-arm/bits/heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003,2004 Philippe Gerum . 3 | * 4 | * ARM port 5 | * Copyright (C) 2005 Stelian Pop 6 | * 7 | * Xenomai is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * Xenomai is distributed in the hope that it will be useful, but 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with Xenomai; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | * 02111-1307, USA. 21 | */ 22 | 23 | #ifndef _XENO_ASM_ARM_BITS_HEAP_H 24 | #define _XENO_ASM_ARM_BITS_HEAP_H 25 | 26 | #include 27 | 28 | #endif /* !_XENO_ASM_ARM_BITS_HEAP_H */ 29 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/asm-arm/bits/intr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003,2004 Philippe Gerum . 3 | * 4 | * ARM port 5 | * Copyright (C) 2005 Stelian Pop 6 | * 7 | * Xenomai is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * Xenomai is distributed in the hope that it will be useful, but 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with Xenomai; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | * 02111-1307, USA. 21 | */ 22 | 23 | #ifndef _XENO_ASM_ARM_BITS_INTR_H 24 | #define _XENO_ASM_ARM_BITS_INTR_H 25 | 26 | #include 27 | 28 | static inline void xnarch_relay_tick(void) 29 | { 30 | rthal_irq_host_pend(RTHAL_TIMER_IRQ); 31 | } 32 | 33 | #endif /* !_XENO_ASM_ARM_BITS_INTR_H */ 34 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/asm-blackfin/bits/bind.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_ASM_BLACKFIN_BIND_H 2 | #define _XENO_ASM_BLACKFIN_BIND_H 3 | 4 | #include 5 | 6 | #endif /* _XENO_ASM_BLACKFIN_BIND_H */ 7 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/asm-blackfin/bits/heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_ASM_BLACKFIN_BITS_HEAP_H 21 | #define _XENO_ASM_BLACKFIN_BITS_HEAP_H 22 | 23 | #include 24 | 25 | #endif /* !_XENO_ASM_BLACKFIN_BITS_HEAP_H */ 26 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/asm-blackfin/bits/intr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_ASM_BLACKFIN_BITS_INTR_H 21 | #define _XENO_ASM_BLACKFIN_BITS_INTR_H 22 | 23 | #include 24 | 25 | static inline void xnarch_relay_tick(void) 26 | { 27 | #ifdef CONFIG_GENERIC_CLOCKEVENTS 28 | rthal_irq_host_pend(RTHAL_TIMER_IRQ); 29 | #endif 30 | } 31 | 32 | #endif /* !_XENO_ASM_BLACKFIN_BITS_INTR_H */ 33 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/asm-blackfin/bits/sched.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_ASM_BLACKFIN_BITS_SCHED_H 21 | #define _XENO_ASM_BLACKFIN_BITS_SCHED_H 22 | 23 | static inline void xnarch_init_root_tcb(xnarchtcb_t * tcb, 24 | struct xnthread *thread, 25 | const char *name) 26 | { 27 | tcb->user_task = current; 28 | #ifdef CONFIG_MPU 29 | tcb->active_task = NULL; 30 | #endif 31 | tcb->tsp = &tcb->ts; 32 | tcb->entry = NULL; 33 | tcb->cookie = NULL; 34 | tcb->self = thread; 35 | tcb->imask = 0; 36 | tcb->name = name; 37 | } 38 | 39 | #endif /* !_XENO_ASM_BLACKFIN_BITS_SCHED_H */ 40 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/asm-blackfin/fptest.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_ASM_BLACKFIN_FPTEST_H 2 | #define _XENO_ASM_BLACKFIN_FPTEST_H 3 | 4 | #ifdef __KERNEL__ 5 | #include 6 | 7 | static inline int fp_kernel_supported(void) 8 | { 9 | return 0; 10 | } 11 | 12 | static inline int fp_linux_begin(void) 13 | { 14 | return -ENOSYS; 15 | } 16 | 17 | static inline void fp_linux_end(void) 18 | { 19 | } 20 | 21 | #else /* !__KERNEL__ */ 22 | #include 23 | #define printk printf 24 | #endif /* !__KERNEL__ */ 25 | 26 | static inline void fp_features_init(void) 27 | { 28 | } 29 | 30 | static inline void fp_regs_set(unsigned val) 31 | { 32 | } 33 | 34 | static inline unsigned fp_regs_check(unsigned val) 35 | { 36 | return val; 37 | } 38 | 39 | #endif /* _XENO_ASM_BLACKFIN_FPTEST_H */ 40 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/asm-generic/bind.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_ASM_GENERIC_BITS_BIND_H 2 | #define _XENO_ASM_GENERIC_BITS_BIND_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include /* For __constructor__ */ 8 | 9 | int 10 | xeno_bind_skin_opt(unsigned skin_magic, const char *skin, const char *module); 11 | 12 | static inline int 13 | xeno_bind_skin(unsigned skin_magic, const char *skin, const char *module) 14 | { 15 | int muxid = xeno_bind_skin_opt(skin_magic, skin, module); 16 | 17 | if (muxid == -1) { 18 | fprintf(stderr, 19 | "Xenomai: %s skin or CONFIG_XENO_OPT_PERVASIVE disabled.\n" 20 | "(modprobe %s?)\n", skin, module); 21 | exit(EXIT_FAILURE); 22 | } 23 | 24 | return muxid; 25 | } 26 | 27 | #endif /* _XENO_ASM_GENERIC_BITS_BIND_H */ 28 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/asm-generic/bits/heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003,2004,2005 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_ASM_GENERIC_BITS_HEAP_H 21 | #define _XENO_ASM_GENERIC_BITS_HEAP_H 22 | 23 | #ifndef __KERNEL__ 24 | #error "Pure kernel header included from user-space!" 25 | #endif 26 | 27 | static inline void xnarch_init_heapcb (xnarch_heapcb_t *hcb) 28 | 29 | { 30 | hcb->numaps = 0; 31 | hcb->kmflags = 0; 32 | hcb->heapbase = NULL; 33 | } 34 | 35 | #endif /* !_XENO_ASM_GENERIC_BITS_HEAP_H */ 36 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/asm-generic/pci_ids.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_ASM_GENERIC_PCI_IDS_H 2 | #define _XENO_ASM_GENERIC_PCI_IDS_H 3 | 4 | #include 5 | 6 | /* SMI */ 7 | #ifndef PCI_DEVICE_ID_INTEL_ESB2_0 8 | #define PCI_DEVICE_ID_INTEL_ESB2_0 0x2670 9 | #endif 10 | #ifndef PCI_DEVICE_ID_INTEL_ICH7_0 11 | #define PCI_DEVICE_ID_INTEL_ICH7_0 0x27b8 12 | #endif 13 | #ifndef PCI_DEVICE_ID_INTEL_ICH7_1 14 | #define PCI_DEVICE_ID_INTEL_ICH7_1 0x27b9 15 | #endif 16 | #ifndef PCI_DEVICE_ID_INTEL_ICH8_4 17 | #define PCI_DEVICE_ID_INTEL_ICH8_4 0x2815 18 | #endif 19 | #ifndef PCI_DEVICE_ID_INTEL_ICH9_1 20 | #define PCI_DEVICE_ID_INTEL_ICH9_1 0x2917 21 | #endif 22 | #ifndef PCI_DEVICE_ID_INTEL_ICH9_5 23 | #define PCI_DEVICE_ID_INTEL_ICH9_5 0x2919 24 | #endif 25 | #ifndef PCI_DEVICE_ID_INTEL_ICH10_1 26 | #define PCI_DEVICE_ID_INTEL_ICH10_1 0x3a16 27 | #endif 28 | #ifndef PCI_DEVICE_ID_INTEL_PCH_LPC_MIN 29 | #define PCI_DEVICE_ID_INTEL_PCH_LPC_MIN 0x3b00 30 | #endif 31 | 32 | /* RTCAN */ 33 | #ifndef PCI_VENDOR_ID_ESDGMBH 34 | #define PCI_VENDOR_ID_ESDGMBH 0x12fe 35 | #endif 36 | #ifndef PCI_DEVICE_ID_PLX_9030 37 | #define PCI_DEVICE_ID_PLX_9030 0x9030 38 | #endif 39 | #ifndef PCI_DEVICE_ID_PLX_9056 40 | #define PCI_DEVICE_ID_PLX_9056 0x9056 41 | #endif 42 | 43 | #endif /* _XENO_ASM_GENERIC_PCI_IDS_H */ 44 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/asm-generic/sem_heap.h: -------------------------------------------------------------------------------- 1 | #ifndef SEM_HEAP_H 2 | #define SEM_HEAP_H 3 | 4 | extern unsigned long xeno_sem_heap[2]; 5 | 6 | #endif /* SEM_HEAP_H */ 7 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/asm-generic/sigshadow.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_ASM_GENERIC_BITS_SIGSHADOW_H 2 | #define _XENO_ASM_GENERIC_BITS_SIGSHADOW_H 3 | 4 | void xeno_sigshadow_install_once(void); 5 | 6 | #endif /* _XENO_ASM_GENERIC_BITS_SIGSHADOW_H */ 7 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/asm-generic/stack.h: -------------------------------------------------------------------------------- 1 | #ifndef STACKSIZE_H 2 | #define STACKSIZE_H 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif /* __cplusplus */ 12 | 13 | static inline unsigned xeno_stacksize(unsigned size) 14 | { 15 | static const unsigned default_size = __WORDSIZE * 1024; 16 | static unsigned min_size; 17 | if (!min_size) 18 | min_size = PTHREAD_STACK_MIN + getpagesize(); 19 | 20 | if (!size) 21 | size = default_size; 22 | if (size < min_size) 23 | size = min_size; 24 | 25 | return size; 26 | } 27 | 28 | void xeno_fault_stack(void); 29 | 30 | #ifdef __cplusplus 31 | } 32 | #endif /* __cplusplus */ 33 | 34 | #endif /* STACKSIZE_H */ 35 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/asm-generic/timeconv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010 Jan Kiszka . 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with this library; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. 17 | */ 18 | 19 | #ifndef _XENO_ASM_GENERIC_TIMECONV_H 20 | #define _XENO_ASM_GENERIC_TIMECONV_H 21 | 22 | #ifndef __KERNEL__ 23 | extern xnsysinfo_t sysinfo; 24 | 25 | void xeno_init_timeconv(int muxid); 26 | #endif 27 | 28 | long long xnarch_tsc_to_ns(long long ticks); 29 | long long xnarch_tsc_to_ns_rounded(long long ticks); 30 | long long xnarch_ns_to_tsc(long long ns); 31 | 32 | #endif /* !_XENO_ASM_GENERIC_TIMECONV_H */ 33 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/asm-nios2/bits/bind.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_ASM_NIOS2_BIND_H 2 | #define _XENO_ASM_NIOS2_BIND_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | #include 14 | 15 | volatile void *xeno_nios2_hrclock = NULL; 16 | 17 | static inline void xeno_nios2_features_check(struct xnfeatinfo *finfo) 18 | { 19 | unsigned long pa = finfo->feat_arch.hrclock_membase; 20 | unsigned int pagesz; 21 | void *p; 22 | int fd; 23 | 24 | fd = open("/dev/mem", O_RDWR | O_SYNC); 25 | if (fd == -1) { 26 | perror("Xenomai init: open(/dev/mem)"); 27 | exit(EXIT_FAILURE); 28 | } 29 | 30 | pagesz = sysconf(_SC_PAGESIZE); 31 | p = mmap(NULL, pagesz, PROT_READ | PROT_WRITE, MAP_SHARED, fd, pa & ~(pagesz - 1)); 32 | if (p == MAP_FAILED) { 33 | perror("Xenomai init: mmap(/dev/mem)"); 34 | exit(EXIT_FAILURE); 35 | } 36 | close(fd); 37 | 38 | xeno_nios2_hrclock = (volatile void *)(p + (pa & (pagesz - 1))); 39 | } 40 | 41 | #define xeno_arch_features_check(finfo) xeno_nios2_features_check(finfo) 42 | 43 | #endif /* _XENO_ASM_NIOS2_BIND_H */ 44 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/asm-nios2/bits/heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_ASM_NIOS2_BITS_HEAP_H 21 | #define _XENO_ASM_NIOS2_BITS_HEAP_H 22 | 23 | #include 24 | 25 | #endif /* !_XENO_ASM_NIOS2_BITS_HEAP_H */ 26 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/asm-nios2/bits/intr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_ASM_NIOS2_BITS_INTR_H 21 | #define _XENO_ASM_NIOS2_BITS_INTR_H 22 | 23 | #include 24 | 25 | static inline void xnarch_relay_tick(void) 26 | { 27 | /* 28 | * We have a dedicated timer on this arch, so no need for 29 | * piggybacking the kernel timer. 30 | */ 31 | } 32 | 33 | #endif /* !_XENO_ASM_NIOS2_BITS_INTR_H */ 34 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/asm-nios2/fptest.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_ASM_NIOS2_FPTEST_H 2 | #define _XENO_ASM_NIOS2_FPTEST_H 3 | 4 | #ifdef __KERNEL__ 5 | #include 6 | 7 | static inline int fp_kernel_supported(void) 8 | { 9 | return 0; 10 | } 11 | 12 | static inline int fp_linux_begin(void) 13 | { 14 | return -ENOSYS; 15 | } 16 | 17 | static inline void fp_linux_end(void) 18 | { 19 | } 20 | 21 | #else /* !__KERNEL__ */ 22 | #include 23 | #define printk printf 24 | #endif /* !__KERNEL__ */ 25 | 26 | static inline void fp_features_init(void) 27 | { 28 | } 29 | 30 | static inline void fp_regs_set(unsigned val) 31 | { 32 | } 33 | 34 | static inline unsigned fp_regs_check(unsigned val) 35 | { 36 | return val; 37 | } 38 | 39 | #endif /* _XENO_ASM_NIOS2_FPTEST_H */ 40 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/asm-powerpc/bits/bind.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_ASM_POWERPC_BIND_H 2 | #define _XENO_ASM_POWERPC_BIND_H 3 | 4 | #include 5 | 6 | #endif /* _XENO_ASM_POWERPC_BIND_H */ 7 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/asm-powerpc/bits/heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003,2004 Philippe Gerum . 3 | * 4 | * 64-bit PowerPC adoption 5 | * copyright (C) 2005 Taneli Vähäkangas and Heikki Lindholm 6 | * 7 | * Xenomai is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * Xenomai is distributed in the hope that it will be useful, but 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with Xenomai; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | * 02111-1307, USA. 21 | */ 22 | 23 | #ifndef _XENO_ASM_POWERPC_BITS_HEAP_H 24 | #define _XENO_ASM_POWERPC_BITS_HEAP_H 25 | 26 | #include 27 | 28 | #endif /* !_XENO_ASM_POWERPC_BITS_HEAP_H */ 29 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/asm-sh/arith.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_ASM_SH_ARITH_H 21 | #define _XENO_ASM_SH_ARITH_H 22 | 23 | #include 24 | 25 | #define __rthal_add96and64(l0, l1, l2, s0, s1) \ 26 | do { \ 27 | __asm__ ("clrt\n\t" \ 28 | "addc %4, %2\n\t" \ 29 | "addc %3, %1\n\t" \ 30 | "addc %5, %0\n\t" \ 31 | : "+r"(l0), "+r"(l1), "+r"(l2) \ 32 | : "r"(s0), "r"(s1), "r" (0) : "t"); \ 33 | } while (0) 34 | 35 | #include 36 | 37 | #endif /* _XENO_ASM_SH_ARITH_H */ 38 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/asm-sh/bits/heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_ASM_SH_BITS_HEAP_H 21 | #define _XENO_ASM_SH_BITS_HEAP_H 22 | 23 | #include 24 | 25 | #endif /* !_XENO_ASM_SH_BITS_HEAP_H */ 26 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/asm-sh/bits/intr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_ASM_SH_BITS_INTR_H 21 | #define _XENO_ASM_SH_BITS_INTR_H 22 | 23 | #include 24 | 25 | static inline void xnarch_relay_tick(void) 26 | { 27 | rthal_irq_host_pend(RTHAL_TIMER_IRQ); 28 | } 29 | 30 | #endif /* !_XENO_ASM_SH_BITS_INTR_H */ 31 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/asm-sh/fptest.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_ASM_SH_FPTEST_H 2 | #define _XENO_ASM_SH_FPTEST_H 3 | 4 | #ifdef __KERNEL__ 5 | #include 6 | 7 | static inline int fp_kernel_supported(void) 8 | { 9 | return 0; 10 | } 11 | 12 | static inline int fp_linux_begin(void) 13 | { 14 | return -ENOSYS; 15 | } 16 | 17 | static inline void fp_linux_end(void) 18 | { 19 | } 20 | 21 | #else /* !__KERNEL__ */ 22 | #include 23 | #define printk printf 24 | #endif /* !__KERNEL__ */ 25 | 26 | static inline void fp_features_init(void) 27 | { 28 | } 29 | 30 | static inline void fp_regs_set(unsigned val) 31 | { 32 | } 33 | 34 | static inline unsigned fp_regs_check(unsigned val) 35 | { 36 | return val; 37 | } 38 | 39 | #endif /* _XENO_ASM_SH_FPTEST_H */ 40 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/asm-sim/atomic.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * This program is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU General Public License as 6 | * published by the Free Software Foundation; either version 2 of the 7 | * License, or (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | * 18 | * This file implements the interface between the Xenomai nucleus and 19 | * the Minute Virtual Machine. 20 | */ 21 | 22 | #ifndef _XENO_ASM_SIM_ATOMIC_H 23 | #define _XENO_ASM_SIM_ATOMIC_H 24 | 25 | typedef unsigned long xnarch_atomic_t; 26 | 27 | unsigned long mvm_atomic_cmpxchg(unsigned long *p, 28 | unsigned long o, unsigned long n); 29 | 30 | #define xnarch_atomic_cmpxchg(p,o,n) \ 31 | mvm_atomic_cmpxchg(p, o, n) 32 | 33 | #endif /* _XENO_ASM_SIM_ATOMIC_H */ 34 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/asm-sim/bits/heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * This program is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU General Public License as 6 | * published by the Free Software Foundation; either version 2 of the 7 | * License, or (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef _XENO_ASM_SIM_BITS_HEAP_H 20 | #define _XENO_ASM_SIM_BITS_HEAP_H 21 | 22 | /* Empty */ 23 | 24 | #endif /* !_XENO_ASM_SIM_BITS_HEAP_H */ 25 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/asm-sim/bits/sched.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 Philippe Gerum . 3 | * 4 | * This program is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU General Public License as 6 | * published by the Free Software Foundation; either version 2 of the 7 | * License, or (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef _XENO_ASM_SIM_BITS_SCHED_H 20 | #define _XENO_ASM_SIM_BITS_SCHED_H 21 | 22 | #ifdef __IN_XENO__ 23 | 24 | static inline void xnarch_init_root_tcb (xnarchtcb_t *tcb, 25 | struct xnthread *thread, 26 | const char *name) 27 | { 28 | tcb->vmthread = mvm_thread_self(); 29 | } 30 | 31 | #else 32 | 33 | #include_next 34 | 35 | #endif 36 | 37 | #endif /* !_XENO_ASM_SIM_BITS_SCHED_H */ 38 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/asm-sim/bits/thread.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * This program is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU General Public License as 6 | * published by the Free Software Foundation; either version 2 of the 7 | * License, or (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef _XENO_ASM_SIM_BITS_THREAD_H 20 | #define _XENO_ASM_SIM_BITS_THREAD_H 21 | 22 | static inline void xnarch_init_tcb (xnarchtcb_t *tcb) 23 | { 24 | tcb->vmthread = NULL; 25 | } 26 | 27 | #define xnarch_alloc_stack(tcb,stacksize) 0 28 | #define xnarch_free_stack(tcb) do { } while(0) 29 | 30 | #endif /* !_XENO_ASM_SIM_BITS_THREAD_H */ 31 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/asm-sim/bits/timer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * This program is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU General Public License as 6 | * published by the Free Software Foundation; either version 2 of the 7 | * License, or (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef _XENO_ASM_SIM_BITS_TIMER_H 20 | #define _XENO_ASM_SIM_BITS_TIMER_H 21 | 22 | static inline void xnarch_program_timer_shot (unsigned long delay) 23 | { 24 | /* 1 tsc unit of the virtual CPU == 1 ns. */ 25 | mvm_program_timer(delay ?: 1); 26 | } 27 | 28 | static inline void xnarch_send_timer_ipi (xnarch_cpumask_t mask) 29 | { 30 | } 31 | 32 | #endif /* !_XENO_ASM_SIM_BITS_TIMER_H */ 33 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/asm-x86/arith.h: -------------------------------------------------------------------------------- 1 | #ifdef __i386__ 2 | #include "arith_32.h" 3 | #else 4 | #include "arith_64.h" 5 | #endif 6 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/asm-x86/bits/bind.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_ASM_X86_BIND_H 2 | #define _XENO_ASM_X86_BIND_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #include 10 | #include 11 | 12 | #ifdef __i386__ 13 | static inline void xeno_x86_features_check(struct xnfeatinfo *finfo) 14 | { 15 | #ifdef CONFIG_XENO_X86_SEP 16 | size_t n = confstr(_CS_GNU_LIBPTHREAD_VERSION, NULL, 0); 17 | if (n > 0) { 18 | char buf[n]; 19 | 20 | confstr (_CS_GNU_LIBPTHREAD_VERSION, buf, n); 21 | 22 | if (strstr (buf, "NPTL")) 23 | return; 24 | } 25 | 26 | fprintf(stderr, 27 | "Xenomai: --enable-x86-sep needs NPTL and Linux 2.6.x or higher,\n" 28 | "which does not match your configuration. Please upgrade, or\n" 29 | "rebuild the user-space support passing --disable-x86-sep.\n"); 30 | exit(1); 31 | #endif /* CONFIG_XENO_X86_SEP */ 32 | } 33 | #define xeno_arch_features_check(finfo) xeno_x86_features_check(finfo) 34 | 35 | #endif /* __i386__ */ 36 | 37 | #endif /* _XENO_ASM_X86_BIND_H */ 38 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/asm-x86/bits/heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_ASM_X86_BITS_HEAP_H 21 | #define _XENO_ASM_X86_BITS_HEAP_H 22 | 23 | #include 24 | 25 | #endif /* !_XENO_ASM_X86_BITS_HEAP_H */ 26 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/asm-x86/bits/intr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_ASM_X86_BITS_INTR_H 21 | #define _XENO_ASM_X86_BITS_INTR_H 22 | 23 | #include 24 | 25 | static inline void xnarch_relay_tick(void) 26 | { 27 | rthal_irq_host_pend(RTHAL_HOST_TICK_IRQ); 28 | } 29 | 30 | #endif /* !_XENO_ASM_X86_BITS_INTR_H */ 31 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/asm-x86/features.h: -------------------------------------------------------------------------------- 1 | #ifdef __i386__ 2 | #include "features_32.h" 3 | #else 4 | #include "features_64.h" 5 | #endif 6 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/asm-x86/switch.h: -------------------------------------------------------------------------------- 1 | #ifdef __i386__ 2 | #include "switch_32.h" 3 | #else 4 | #include "switch_64.h" 5 | #endif 6 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/asm-x86/wrappers.h: -------------------------------------------------------------------------------- 1 | #ifdef __i386__ 2 | #include "wrappers_32.h" 3 | #else 4 | #include "wrappers_64.h" 5 | #endif 6 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/asm/bits/heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003,2004 Philippe Gerum . 3 | * 4 | * ARM port 5 | * Copyright (C) 2005 Stelian Pop 6 | * 7 | * Xenomai is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * Xenomai is distributed in the hope that it will be useful, but 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with Xenomai; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | * 02111-1307, USA. 21 | */ 22 | 23 | #ifndef _XENO_ASM_ARM_BITS_HEAP_H 24 | #define _XENO_ASM_ARM_BITS_HEAP_H 25 | 26 | #include 27 | 28 | #endif /* !_XENO_ASM_ARM_BITS_HEAP_H */ 29 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/asm/bits/intr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003,2004 Philippe Gerum . 3 | * 4 | * ARM port 5 | * Copyright (C) 2005 Stelian Pop 6 | * 7 | * Xenomai is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * Xenomai is distributed in the hope that it will be useful, but 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with Xenomai; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | * 02111-1307, USA. 21 | */ 22 | 23 | #ifndef _XENO_ASM_ARM_BITS_INTR_H 24 | #define _XENO_ASM_ARM_BITS_INTR_H 25 | 26 | #include 27 | 28 | static inline void xnarch_relay_tick(void) 29 | { 30 | rthal_irq_host_pend(RTHAL_TIMER_IRQ); 31 | } 32 | 33 | #endif /* !_XENO_ASM_ARM_BITS_INTR_H */ 34 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/nucleus/ppd.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_NUCLEUS_PPD_H 2 | #define _XENO_NUCLEUS_PPD_H 3 | 4 | #include 5 | #include 6 | 7 | struct mm_struct; 8 | 9 | typedef struct xnshadow_ppd_key { 10 | unsigned long muxid; 11 | struct mm_struct *mm; 12 | } xnshadow_ppd_key_t; 13 | 14 | typedef struct xnshadow_ppd_t { 15 | xnshadow_ppd_key_t key; 16 | xnholder_t link; 17 | #define link2ppd(ln) container_of(ln, xnshadow_ppd_t, link) 18 | } xnshadow_ppd_t; 19 | 20 | #define xnshadow_ppd_muxid(ppd) ((ppd)->key.muxid) 21 | 22 | #define xnshadow_ppd_mm(ppd) ((ppd)->key.mm) 23 | 24 | /* Call with nklock locked irqs off. */ 25 | xnshadow_ppd_t *xnshadow_ppd_get(unsigned muxid); 26 | 27 | #endif /* _XENO_NUCLEUS_PPD_H */ 28 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/nucleus/sys_ppd.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_NUCLEUS_SYS_PPD_H 2 | #define _XENO_NUCLEUS_SYS_PPD_H 3 | 4 | #include 5 | #include 6 | 7 | struct xnsys_ppd { 8 | xnshadow_ppd_t ppd; 9 | xnheap_t sem_heap; 10 | #ifdef XNARCH_HAVE_MAYDAY 11 | unsigned long mayday_addr; 12 | #endif 13 | xnarch_atomic_t refcnt; 14 | #define ppd2sys(addr) container_of(addr, struct xnsys_ppd, ppd) 15 | }; 16 | 17 | extern struct xnsys_ppd __xnsys_global_ppd; 18 | 19 | #ifdef CONFIG_XENO_OPT_PERVASIVE 20 | 21 | static inline struct xnsys_ppd *xnsys_ppd_get(int global) 22 | { 23 | xnshadow_ppd_t *ppd; 24 | 25 | if (global || !(ppd = xnshadow_ppd_get(0))) 26 | return &__xnsys_global_ppd; 27 | 28 | return ppd2sys(ppd); 29 | } 30 | 31 | #else /* !CONFIG_XENO_OPT_PERVASIVE */ 32 | 33 | static inline struct xnsys_ppd *xnsys_ppd_get(int global) 34 | { 35 | return &__xnsys_global_ppd; 36 | } 37 | 38 | #endif /* !CONFIG_XENO_OPT_PERVASIVE */ 39 | 40 | #endif /* _XENO_NUCLEUS_SYS_PPD_H */ 41 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/nucleus/system.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published 6 | * by the Free Software Foundation; either version 2 of the License, 7 | * or (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_NUCLEUS_SYSTEM_H 21 | #define _XENO_NUCLEUS_SYSTEM_H 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | #endif /* !_XENO_NUCLEUS_SYSTEM_H */ 30 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/nucleus/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published 6 | * by the Free Software Foundation; either version 2 of the License, 7 | * or (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_NUCLEUS_VERSION_H 21 | #define _XENO_NUCLEUS_VERSION_H 22 | 23 | #define XENO_VERSION(maj,min,rev) (((maj)<<16)|((min)<<8)|(rev)) 24 | 25 | #define XENO_VERSION_CODE XENO_VERSION(CONFIG_XENO_VERSION_MAJOR, \ 26 | CONFIG_XENO_VERSION_MINOR, \ 27 | CONFIG_XENO_REVISION_LEVEL) 28 | 29 | #define XENO_VERSION_NAME "Lies and Truths" 30 | 31 | #define XENO_VERSION_STRING "2.6.3" 32 | 33 | #endif /* _XENO_NUCLEUS_VERSION_H */ 34 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/nucleus/xenomai.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published 6 | * by the Free Software Foundation; either version 2 of the License, 7 | * or (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_NUCLEUS_XENOMAI_H 21 | #define _XENO_NUCLEUS_XENOMAI_H 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | 30 | #endif /* !_XENO_NUCLEUS_XENOMAI_H */ 31 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/posix/stdio.h: -------------------------------------------------------------------------------- 1 | #ifndef __KERNEL__ 2 | 3 | #pragma GCC system_header 4 | 5 | #include_next 6 | 7 | #ifndef _XENO_POSIX_STDIO_H 8 | #define _XENO_POSIX_STDIO_H 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif /* __cplusplus */ 17 | 18 | int __real_vfprintf(FILE *stream, const char *fmt, va_list args); 19 | 20 | #ifdef CONFIG_XENO_FORTIFY 21 | int __real___vfprintf_chk(FILE *stream, int level, const char *fmt, va_list ap); 22 | #endif 23 | 24 | int __real_vprintf(const char *fmt, va_list args); 25 | 26 | int __real_fprintf(FILE *stream, const char *fmt, ...); 27 | 28 | int __real_printf(const char *fmt, ...); 29 | 30 | int __real_puts(const char *s); 31 | 32 | int __real_fputs(const char *s, FILE *stream); 33 | 34 | int __real_fputc(int c, FILE *stream); 35 | 36 | int __real_putchar(int c); 37 | 38 | size_t __real_fwrite(const void *ptr, size_t sz, size_t nmemb, FILE *stream); 39 | 40 | #ifdef __cplusplus 41 | } 42 | #endif /* __cplusplus */ 43 | 44 | #endif /* _XENO_POSIX_STDIO_H */ 45 | 46 | #endif /* !__KERNEL__ */ 47 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/posix/sys/ioctl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005 Philippe Gerum . 3 | * 4 | * This program is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU General Public License as 6 | * published by the Free Software Foundation; either version 2 of the 7 | * License, or (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef _XENO_POSIX_SYS_IOCTL_H 20 | #define _XENO_POSIX_SYS_IOCTL_H 21 | 22 | #if !(defined(__KERNEL__) || defined(__XENO_SIM__)) 23 | 24 | #pragma GCC system_header 25 | 26 | #include_next 27 | 28 | #ifdef __cplusplus 29 | extern "C" { 30 | #endif 31 | 32 | int __real_ioctl(int fildes, int request, ...); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif /* !(__KERNEL__ || __XENO_SIM__) */ 39 | 40 | #endif /* _XENO_POSIX_SYS_IOCTL_H */ 41 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/posix/sys/select.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_POSIX_SELECT_H 2 | #define _XENO_POSIX_SELECT_H 3 | 4 | #if !(defined(__KERNEL__) || defined(__XENO_SIM__)) 5 | 6 | #pragma GCC system_header 7 | 8 | #include_next 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | extern int __real_select (int __nfds, fd_set *__restrict __readfds, 15 | fd_set *__restrict __writefds, 16 | fd_set *__restrict __exceptfds, 17 | struct timeval *__restrict __timeout); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | #endif /* !(__KERNEL__ || __XENO_SIM__) */ 24 | 25 | #endif /* _XENO_POSIX_SELECT_H */ 26 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/posix/syslog.h: -------------------------------------------------------------------------------- 1 | #ifndef SYSLOG_H 2 | #define SYSLOG_H 3 | 4 | #pragma GCC system_header 5 | 6 | #include 7 | #include_next 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif /* __cplusplus */ 13 | 14 | void __real_syslog(int priority, const char *fmt, ...); 15 | 16 | void __real_vsyslog(int priority, const char *fmt, va_list ap); 17 | 18 | #ifdef CONFIG_XENO_FORTIFY 19 | void __real___vsyslog_chk(int priority, int level, const char *fmt, va_list ap); 20 | #endif 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif /* __cplusplus */ 25 | 26 | #endif /* SYSLOG_H */ 27 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/psos+/asr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published 6 | * by the Free Software Foundation; either version 2 of the License, 7 | * or (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _PSOS_ASR_H 21 | #define _PSOS_ASR_H 22 | 23 | #include 24 | #include 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | void psosasr_init(void); 31 | 32 | void psosasr_cleanup(void); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif /* !_PSOS_ASR_ */ 39 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/psos+/event.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published 6 | * by the Free Software Foundation; either version 2 of the License, 7 | * or (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _PSOS_EVENT_H 21 | #define _PSOS_EVENT_H 22 | 23 | #include 24 | #include 25 | 26 | typedef struct psosevent { 27 | 28 | u_long events; /* Event flags */ 29 | 30 | xnsynch_t synchbase; 31 | 32 | } psosevent_t; 33 | 34 | #ifdef __cplusplus 35 | extern "C" { 36 | #endif 37 | 38 | void taskev_init(psosevent_t *evgroup); 39 | 40 | void taskev_destroy(psosevent_t *evgroup); 41 | 42 | #ifdef __cplusplus 43 | } 44 | #endif 45 | 46 | #endif /* !_PSOS_EVENT_H */ 47 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/psos+/long_names.h: -------------------------------------------------------------------------------- 1 | #ifndef LONG_NAMES_H 2 | #define LONG_NAMES_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif /* __cplusplus */ 7 | 8 | const char *__psos_maybe_short_name(char shrt[5], const char *lng); 9 | 10 | #ifdef __cplusplus 11 | } 12 | #endif /* __cplusplus */ 13 | 14 | #endif /* LONG_NAMES_H */ 15 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/analogy/types.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file 3 | * Analogy for Linux, misc declarations 4 | * 5 | * Copyright (C) 1997-2000 David A. Schleef 6 | * Copyright (C) 2008 Alexis Berlemont 7 | * 8 | * Xenomai is free software; you can redistribute it and/or modify it 9 | * under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * Xenomai is distributed in the hope that it will be useful, but 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 | * General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with Xenomai; if not, write to the Free Software Foundation, 20 | * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 | */ 22 | 23 | #ifndef __ANALOGY_TYPES__ 24 | #define __ANALOGY_TYPES__ 25 | 26 | #ifndef DOXYGEN_CPP 27 | 28 | /* --- Misc precompilation constant --- */ 29 | #define A4L_NAMELEN 20 30 | 31 | /* --- Common Analogy types --- */ 32 | 33 | typedef unsigned short sampl_t; 34 | typedef unsigned long lsampl_t; 35 | 36 | #endif /* !DOXYGEN_CPP */ 37 | 38 | #endif /* __ANALOGY_TYPES__ */ 39 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/asm-arm/bits/heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003,2004 Philippe Gerum . 3 | * 4 | * ARM port 5 | * Copyright (C) 2005 Stelian Pop 6 | * 7 | * Xenomai is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * Xenomai is distributed in the hope that it will be useful, but 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with Xenomai; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | * 02111-1307, USA. 21 | */ 22 | 23 | #ifndef _XENO_ASM_ARM_BITS_HEAP_H 24 | #define _XENO_ASM_ARM_BITS_HEAP_H 25 | 26 | #include 27 | 28 | #endif /* !_XENO_ASM_ARM_BITS_HEAP_H */ 29 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/asm-arm/bits/intr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003,2004 Philippe Gerum . 3 | * 4 | * ARM port 5 | * Copyright (C) 2005 Stelian Pop 6 | * 7 | * Xenomai is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * Xenomai is distributed in the hope that it will be useful, but 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with Xenomai; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | * 02111-1307, USA. 21 | */ 22 | 23 | #ifndef _XENO_ASM_ARM_BITS_INTR_H 24 | #define _XENO_ASM_ARM_BITS_INTR_H 25 | 26 | #include 27 | 28 | static inline void xnarch_relay_tick(void) 29 | { 30 | rthal_irq_host_pend(RTHAL_TIMER_IRQ); 31 | } 32 | 33 | #endif /* !_XENO_ASM_ARM_BITS_INTR_H */ 34 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/asm-blackfin/bits/bind.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_ASM_BLACKFIN_BIND_H 2 | #define _XENO_ASM_BLACKFIN_BIND_H 3 | 4 | #include 5 | 6 | #endif /* _XENO_ASM_BLACKFIN_BIND_H */ 7 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/asm-blackfin/bits/heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_ASM_BLACKFIN_BITS_HEAP_H 21 | #define _XENO_ASM_BLACKFIN_BITS_HEAP_H 22 | 23 | #include 24 | 25 | #endif /* !_XENO_ASM_BLACKFIN_BITS_HEAP_H */ 26 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/asm-blackfin/bits/intr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_ASM_BLACKFIN_BITS_INTR_H 21 | #define _XENO_ASM_BLACKFIN_BITS_INTR_H 22 | 23 | #include 24 | 25 | static inline void xnarch_relay_tick(void) 26 | { 27 | #ifdef CONFIG_GENERIC_CLOCKEVENTS 28 | rthal_irq_host_pend(RTHAL_TIMER_IRQ); 29 | #endif 30 | } 31 | 32 | #endif /* !_XENO_ASM_BLACKFIN_BITS_INTR_H */ 33 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/asm-blackfin/bits/sched.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_ASM_BLACKFIN_BITS_SCHED_H 21 | #define _XENO_ASM_BLACKFIN_BITS_SCHED_H 22 | 23 | static inline void xnarch_init_root_tcb(xnarchtcb_t * tcb, 24 | struct xnthread *thread, 25 | const char *name) 26 | { 27 | tcb->user_task = current; 28 | #ifdef CONFIG_MPU 29 | tcb->active_task = NULL; 30 | #endif 31 | tcb->tsp = &tcb->ts; 32 | tcb->entry = NULL; 33 | tcb->cookie = NULL; 34 | tcb->self = thread; 35 | tcb->imask = 0; 36 | tcb->name = name; 37 | } 38 | 39 | #endif /* !_XENO_ASM_BLACKFIN_BITS_SCHED_H */ 40 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/asm-blackfin/fptest.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_ASM_BLACKFIN_FPTEST_H 2 | #define _XENO_ASM_BLACKFIN_FPTEST_H 3 | 4 | #ifdef __KERNEL__ 5 | #include 6 | 7 | static inline int fp_kernel_supported(void) 8 | { 9 | return 0; 10 | } 11 | 12 | static inline int fp_linux_begin(void) 13 | { 14 | return -ENOSYS; 15 | } 16 | 17 | static inline void fp_linux_end(void) 18 | { 19 | } 20 | 21 | #else /* !__KERNEL__ */ 22 | #include 23 | #define printk printf 24 | #endif /* !__KERNEL__ */ 25 | 26 | static inline void fp_features_init(void) 27 | { 28 | } 29 | 30 | static inline void fp_regs_set(unsigned val) 31 | { 32 | } 33 | 34 | static inline unsigned fp_regs_check(unsigned val) 35 | { 36 | return val; 37 | } 38 | 39 | #endif /* _XENO_ASM_BLACKFIN_FPTEST_H */ 40 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/asm-generic/bind.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_ASM_GENERIC_BITS_BIND_H 2 | #define _XENO_ASM_GENERIC_BITS_BIND_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include /* For __constructor__ */ 8 | 9 | int 10 | xeno_bind_skin_opt(unsigned skin_magic, const char *skin, const char *module); 11 | 12 | static inline int 13 | xeno_bind_skin(unsigned skin_magic, const char *skin, const char *module) 14 | { 15 | int muxid = xeno_bind_skin_opt(skin_magic, skin, module); 16 | 17 | if (muxid == -1) { 18 | fprintf(stderr, 19 | "Xenomai: %s skin or CONFIG_XENO_OPT_PERVASIVE disabled.\n" 20 | "(modprobe %s?)\n", skin, module); 21 | exit(EXIT_FAILURE); 22 | } 23 | 24 | return muxid; 25 | } 26 | 27 | #endif /* _XENO_ASM_GENERIC_BITS_BIND_H */ 28 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/asm-generic/bits/heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003,2004,2005 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_ASM_GENERIC_BITS_HEAP_H 21 | #define _XENO_ASM_GENERIC_BITS_HEAP_H 22 | 23 | #ifndef __KERNEL__ 24 | #error "Pure kernel header included from user-space!" 25 | #endif 26 | 27 | static inline void xnarch_init_heapcb (xnarch_heapcb_t *hcb) 28 | 29 | { 30 | hcb->numaps = 0; 31 | hcb->kmflags = 0; 32 | hcb->heapbase = NULL; 33 | } 34 | 35 | #endif /* !_XENO_ASM_GENERIC_BITS_HEAP_H */ 36 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/asm-generic/pci_ids.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_ASM_GENERIC_PCI_IDS_H 2 | #define _XENO_ASM_GENERIC_PCI_IDS_H 3 | 4 | #include 5 | 6 | /* SMI */ 7 | #ifndef PCI_DEVICE_ID_INTEL_ESB2_0 8 | #define PCI_DEVICE_ID_INTEL_ESB2_0 0x2670 9 | #endif 10 | #ifndef PCI_DEVICE_ID_INTEL_ICH7_0 11 | #define PCI_DEVICE_ID_INTEL_ICH7_0 0x27b8 12 | #endif 13 | #ifndef PCI_DEVICE_ID_INTEL_ICH7_1 14 | #define PCI_DEVICE_ID_INTEL_ICH7_1 0x27b9 15 | #endif 16 | #ifndef PCI_DEVICE_ID_INTEL_ICH8_4 17 | #define PCI_DEVICE_ID_INTEL_ICH8_4 0x2815 18 | #endif 19 | #ifndef PCI_DEVICE_ID_INTEL_ICH9_1 20 | #define PCI_DEVICE_ID_INTEL_ICH9_1 0x2917 21 | #endif 22 | #ifndef PCI_DEVICE_ID_INTEL_ICH9_5 23 | #define PCI_DEVICE_ID_INTEL_ICH9_5 0x2919 24 | #endif 25 | #ifndef PCI_DEVICE_ID_INTEL_ICH10_1 26 | #define PCI_DEVICE_ID_INTEL_ICH10_1 0x3a16 27 | #endif 28 | #ifndef PCI_DEVICE_ID_INTEL_PCH_LPC_MIN 29 | #define PCI_DEVICE_ID_INTEL_PCH_LPC_MIN 0x3b00 30 | #endif 31 | 32 | /* RTCAN */ 33 | #ifndef PCI_VENDOR_ID_ESDGMBH 34 | #define PCI_VENDOR_ID_ESDGMBH 0x12fe 35 | #endif 36 | #ifndef PCI_DEVICE_ID_PLX_9030 37 | #define PCI_DEVICE_ID_PLX_9030 0x9030 38 | #endif 39 | #ifndef PCI_DEVICE_ID_PLX_9056 40 | #define PCI_DEVICE_ID_PLX_9056 0x9056 41 | #endif 42 | 43 | #endif /* _XENO_ASM_GENERIC_PCI_IDS_H */ 44 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/asm-generic/sem_heap.h: -------------------------------------------------------------------------------- 1 | #ifndef SEM_HEAP_H 2 | #define SEM_HEAP_H 3 | 4 | extern unsigned long xeno_sem_heap[2]; 5 | 6 | #endif /* SEM_HEAP_H */ 7 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/asm-generic/sigshadow.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_ASM_GENERIC_BITS_SIGSHADOW_H 2 | #define _XENO_ASM_GENERIC_BITS_SIGSHADOW_H 3 | 4 | void xeno_sigshadow_install_once(void); 5 | 6 | #endif /* _XENO_ASM_GENERIC_BITS_SIGSHADOW_H */ 7 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/asm-generic/stack.h: -------------------------------------------------------------------------------- 1 | #ifndef STACKSIZE_H 2 | #define STACKSIZE_H 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif /* __cplusplus */ 12 | 13 | static inline unsigned xeno_stacksize(unsigned size) 14 | { 15 | static const unsigned default_size = __WORDSIZE * 1024; 16 | static unsigned min_size; 17 | if (!min_size) 18 | min_size = PTHREAD_STACK_MIN + getpagesize(); 19 | 20 | if (!size) 21 | size = default_size; 22 | if (size < min_size) 23 | size = min_size; 24 | 25 | return size; 26 | } 27 | 28 | void xeno_fault_stack(void); 29 | 30 | #ifdef __cplusplus 31 | } 32 | #endif /* __cplusplus */ 33 | 34 | #endif /* STACKSIZE_H */ 35 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/asm-generic/timeconv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2010 Jan Kiszka . 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with this library; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. 17 | */ 18 | 19 | #ifndef _XENO_ASM_GENERIC_TIMECONV_H 20 | #define _XENO_ASM_GENERIC_TIMECONV_H 21 | 22 | #ifndef __KERNEL__ 23 | extern xnsysinfo_t sysinfo; 24 | 25 | void xeno_init_timeconv(int muxid); 26 | #endif 27 | 28 | long long xnarch_tsc_to_ns(long long ticks); 29 | long long xnarch_tsc_to_ns_rounded(long long ticks); 30 | long long xnarch_ns_to_tsc(long long ns); 31 | 32 | #endif /* !_XENO_ASM_GENERIC_TIMECONV_H */ 33 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/asm-nios2/bits/bind.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_ASM_NIOS2_BIND_H 2 | #define _XENO_ASM_NIOS2_BIND_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | #include 14 | 15 | volatile void *xeno_nios2_hrclock = NULL; 16 | 17 | static inline void xeno_nios2_features_check(struct xnfeatinfo *finfo) 18 | { 19 | unsigned long pa = finfo->feat_arch.hrclock_membase; 20 | unsigned int pagesz; 21 | void *p; 22 | int fd; 23 | 24 | fd = open("/dev/mem", O_RDWR | O_SYNC); 25 | if (fd == -1) { 26 | perror("Xenomai init: open(/dev/mem)"); 27 | exit(EXIT_FAILURE); 28 | } 29 | 30 | pagesz = sysconf(_SC_PAGESIZE); 31 | p = mmap(NULL, pagesz, PROT_READ | PROT_WRITE, MAP_SHARED, fd, pa & ~(pagesz - 1)); 32 | if (p == MAP_FAILED) { 33 | perror("Xenomai init: mmap(/dev/mem)"); 34 | exit(EXIT_FAILURE); 35 | } 36 | close(fd); 37 | 38 | xeno_nios2_hrclock = (volatile void *)(p + (pa & (pagesz - 1))); 39 | } 40 | 41 | #define xeno_arch_features_check(finfo) xeno_nios2_features_check(finfo) 42 | 43 | #endif /* _XENO_ASM_NIOS2_BIND_H */ 44 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/asm-nios2/bits/heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_ASM_NIOS2_BITS_HEAP_H 21 | #define _XENO_ASM_NIOS2_BITS_HEAP_H 22 | 23 | #include 24 | 25 | #endif /* !_XENO_ASM_NIOS2_BITS_HEAP_H */ 26 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/asm-nios2/bits/intr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_ASM_NIOS2_BITS_INTR_H 21 | #define _XENO_ASM_NIOS2_BITS_INTR_H 22 | 23 | #include 24 | 25 | static inline void xnarch_relay_tick(void) 26 | { 27 | /* 28 | * We have a dedicated timer on this arch, so no need for 29 | * piggybacking the kernel timer. 30 | */ 31 | } 32 | 33 | #endif /* !_XENO_ASM_NIOS2_BITS_INTR_H */ 34 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/asm-nios2/fptest.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_ASM_NIOS2_FPTEST_H 2 | #define _XENO_ASM_NIOS2_FPTEST_H 3 | 4 | #ifdef __KERNEL__ 5 | #include 6 | 7 | static inline int fp_kernel_supported(void) 8 | { 9 | return 0; 10 | } 11 | 12 | static inline int fp_linux_begin(void) 13 | { 14 | return -ENOSYS; 15 | } 16 | 17 | static inline void fp_linux_end(void) 18 | { 19 | } 20 | 21 | #else /* !__KERNEL__ */ 22 | #include 23 | #define printk printf 24 | #endif /* !__KERNEL__ */ 25 | 26 | static inline void fp_features_init(void) 27 | { 28 | } 29 | 30 | static inline void fp_regs_set(unsigned val) 31 | { 32 | } 33 | 34 | static inline unsigned fp_regs_check(unsigned val) 35 | { 36 | return val; 37 | } 38 | 39 | #endif /* _XENO_ASM_NIOS2_FPTEST_H */ 40 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/asm-powerpc/bits/bind.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_ASM_POWERPC_BIND_H 2 | #define _XENO_ASM_POWERPC_BIND_H 3 | 4 | #include 5 | 6 | #endif /* _XENO_ASM_POWERPC_BIND_H */ 7 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/asm-powerpc/bits/heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003,2004 Philippe Gerum . 3 | * 4 | * 64-bit PowerPC adoption 5 | * copyright (C) 2005 Taneli Vähäkangas and Heikki Lindholm 6 | * 7 | * Xenomai is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * Xenomai is distributed in the hope that it will be useful, but 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with Xenomai; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | * 02111-1307, USA. 21 | */ 22 | 23 | #ifndef _XENO_ASM_POWERPC_BITS_HEAP_H 24 | #define _XENO_ASM_POWERPC_BITS_HEAP_H 25 | 26 | #include 27 | 28 | #endif /* !_XENO_ASM_POWERPC_BITS_HEAP_H */ 29 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/asm-sh/arith.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_ASM_SH_ARITH_H 21 | #define _XENO_ASM_SH_ARITH_H 22 | 23 | #include 24 | 25 | #define __rthal_add96and64(l0, l1, l2, s0, s1) \ 26 | do { \ 27 | __asm__ ("clrt\n\t" \ 28 | "addc %4, %2\n\t" \ 29 | "addc %3, %1\n\t" \ 30 | "addc %5, %0\n\t" \ 31 | : "+r"(l0), "+r"(l1), "+r"(l2) \ 32 | : "r"(s0), "r"(s1), "r" (0) : "t"); \ 33 | } while (0) 34 | 35 | #include 36 | 37 | #endif /* _XENO_ASM_SH_ARITH_H */ 38 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/asm-sh/bits/heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_ASM_SH_BITS_HEAP_H 21 | #define _XENO_ASM_SH_BITS_HEAP_H 22 | 23 | #include 24 | 25 | #endif /* !_XENO_ASM_SH_BITS_HEAP_H */ 26 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/asm-sh/bits/intr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_ASM_SH_BITS_INTR_H 21 | #define _XENO_ASM_SH_BITS_INTR_H 22 | 23 | #include 24 | 25 | static inline void xnarch_relay_tick(void) 26 | { 27 | rthal_irq_host_pend(RTHAL_TIMER_IRQ); 28 | } 29 | 30 | #endif /* !_XENO_ASM_SH_BITS_INTR_H */ 31 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/asm-sh/fptest.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_ASM_SH_FPTEST_H 2 | #define _XENO_ASM_SH_FPTEST_H 3 | 4 | #ifdef __KERNEL__ 5 | #include 6 | 7 | static inline int fp_kernel_supported(void) 8 | { 9 | return 0; 10 | } 11 | 12 | static inline int fp_linux_begin(void) 13 | { 14 | return -ENOSYS; 15 | } 16 | 17 | static inline void fp_linux_end(void) 18 | { 19 | } 20 | 21 | #else /* !__KERNEL__ */ 22 | #include 23 | #define printk printf 24 | #endif /* !__KERNEL__ */ 25 | 26 | static inline void fp_features_init(void) 27 | { 28 | } 29 | 30 | static inline void fp_regs_set(unsigned val) 31 | { 32 | } 33 | 34 | static inline unsigned fp_regs_check(unsigned val) 35 | { 36 | return val; 37 | } 38 | 39 | #endif /* _XENO_ASM_SH_FPTEST_H */ 40 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/asm-sim/atomic.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * This program is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU General Public License as 6 | * published by the Free Software Foundation; either version 2 of the 7 | * License, or (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | * 18 | * This file implements the interface between the Xenomai nucleus and 19 | * the Minute Virtual Machine. 20 | */ 21 | 22 | #ifndef _XENO_ASM_SIM_ATOMIC_H 23 | #define _XENO_ASM_SIM_ATOMIC_H 24 | 25 | typedef unsigned long xnarch_atomic_t; 26 | 27 | unsigned long mvm_atomic_cmpxchg(unsigned long *p, 28 | unsigned long o, unsigned long n); 29 | 30 | #define xnarch_atomic_cmpxchg(p,o,n) \ 31 | mvm_atomic_cmpxchg(p, o, n) 32 | 33 | #endif /* _XENO_ASM_SIM_ATOMIC_H */ 34 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/asm-sim/bits/heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * This program is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU General Public License as 6 | * published by the Free Software Foundation; either version 2 of the 7 | * License, or (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef _XENO_ASM_SIM_BITS_HEAP_H 20 | #define _XENO_ASM_SIM_BITS_HEAP_H 21 | 22 | /* Empty */ 23 | 24 | #endif /* !_XENO_ASM_SIM_BITS_HEAP_H */ 25 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/asm-sim/bits/sched.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 Philippe Gerum . 3 | * 4 | * This program is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU General Public License as 6 | * published by the Free Software Foundation; either version 2 of the 7 | * License, or (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef _XENO_ASM_SIM_BITS_SCHED_H 20 | #define _XENO_ASM_SIM_BITS_SCHED_H 21 | 22 | #ifdef __IN_XENO__ 23 | 24 | static inline void xnarch_init_root_tcb (xnarchtcb_t *tcb, 25 | struct xnthread *thread, 26 | const char *name) 27 | { 28 | tcb->vmthread = mvm_thread_self(); 29 | } 30 | 31 | #else 32 | 33 | #include_next 34 | 35 | #endif 36 | 37 | #endif /* !_XENO_ASM_SIM_BITS_SCHED_H */ 38 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/asm-sim/bits/thread.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * This program is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU General Public License as 6 | * published by the Free Software Foundation; either version 2 of the 7 | * License, or (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef _XENO_ASM_SIM_BITS_THREAD_H 20 | #define _XENO_ASM_SIM_BITS_THREAD_H 21 | 22 | static inline void xnarch_init_tcb (xnarchtcb_t *tcb) 23 | { 24 | tcb->vmthread = NULL; 25 | } 26 | 27 | #define xnarch_alloc_stack(tcb,stacksize) 0 28 | #define xnarch_free_stack(tcb) do { } while(0) 29 | 30 | #endif /* !_XENO_ASM_SIM_BITS_THREAD_H */ 31 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/asm-sim/bits/timer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * This program is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU General Public License as 6 | * published by the Free Software Foundation; either version 2 of the 7 | * License, or (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef _XENO_ASM_SIM_BITS_TIMER_H 20 | #define _XENO_ASM_SIM_BITS_TIMER_H 21 | 22 | static inline void xnarch_program_timer_shot (unsigned long delay) 23 | { 24 | /* 1 tsc unit of the virtual CPU == 1 ns. */ 25 | mvm_program_timer(delay ?: 1); 26 | } 27 | 28 | static inline void xnarch_send_timer_ipi (xnarch_cpumask_t mask) 29 | { 30 | } 31 | 32 | #endif /* !_XENO_ASM_SIM_BITS_TIMER_H */ 33 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/asm-x86/arith.h: -------------------------------------------------------------------------------- 1 | #ifdef __i386__ 2 | #include "arith_32.h" 3 | #else 4 | #include "arith_64.h" 5 | #endif 6 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/asm-x86/bits/bind.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_ASM_X86_BIND_H 2 | #define _XENO_ASM_X86_BIND_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #include 10 | #include 11 | 12 | #ifdef __i386__ 13 | static inline void xeno_x86_features_check(struct xnfeatinfo *finfo) 14 | { 15 | #ifdef CONFIG_XENO_X86_SEP 16 | size_t n = confstr(_CS_GNU_LIBPTHREAD_VERSION, NULL, 0); 17 | if (n > 0) { 18 | char buf[n]; 19 | 20 | confstr (_CS_GNU_LIBPTHREAD_VERSION, buf, n); 21 | 22 | if (strstr (buf, "NPTL")) 23 | return; 24 | } 25 | 26 | fprintf(stderr, 27 | "Xenomai: --enable-x86-sep needs NPTL and Linux 2.6.x or higher,\n" 28 | "which does not match your configuration. Please upgrade, or\n" 29 | "rebuild the user-space support passing --disable-x86-sep.\n"); 30 | exit(1); 31 | #endif /* CONFIG_XENO_X86_SEP */ 32 | } 33 | #define xeno_arch_features_check(finfo) xeno_x86_features_check(finfo) 34 | 35 | #endif /* __i386__ */ 36 | 37 | #endif /* _XENO_ASM_X86_BIND_H */ 38 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/asm-x86/bits/heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_ASM_X86_BITS_HEAP_H 21 | #define _XENO_ASM_X86_BITS_HEAP_H 22 | 23 | #include 24 | 25 | #endif /* !_XENO_ASM_X86_BITS_HEAP_H */ 26 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/asm-x86/bits/intr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify it 5 | * under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_ASM_X86_BITS_INTR_H 21 | #define _XENO_ASM_X86_BITS_INTR_H 22 | 23 | #include 24 | 25 | static inline void xnarch_relay_tick(void) 26 | { 27 | rthal_irq_host_pend(RTHAL_HOST_TICK_IRQ); 28 | } 29 | 30 | #endif /* !_XENO_ASM_X86_BITS_INTR_H */ 31 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/asm-x86/features.h: -------------------------------------------------------------------------------- 1 | #ifdef __i386__ 2 | #include "features_32.h" 3 | #else 4 | #include "features_64.h" 5 | #endif 6 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/asm-x86/switch.h: -------------------------------------------------------------------------------- 1 | #ifdef __i386__ 2 | #include "switch_32.h" 3 | #else 4 | #include "switch_64.h" 5 | #endif 6 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/asm-x86/wrappers.h: -------------------------------------------------------------------------------- 1 | #ifdef __i386__ 2 | #include "wrappers_32.h" 3 | #else 4 | #include "wrappers_64.h" 5 | #endif 6 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/asm/bits/heap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003,2004 Philippe Gerum . 3 | * 4 | * ARM port 5 | * Copyright (C) 2005 Stelian Pop 6 | * 7 | * Xenomai is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * Xenomai is distributed in the hope that it will be useful, but 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with Xenomai; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | * 02111-1307, USA. 21 | */ 22 | 23 | #ifndef _XENO_ASM_ARM_BITS_HEAP_H 24 | #define _XENO_ASM_ARM_BITS_HEAP_H 25 | 26 | #include 27 | 28 | #endif /* !_XENO_ASM_ARM_BITS_HEAP_H */ 29 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/asm/bits/intr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003,2004 Philippe Gerum . 3 | * 4 | * ARM port 5 | * Copyright (C) 2005 Stelian Pop 6 | * 7 | * Xenomai is free software; you can redistribute it and/or modify it 8 | * under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * Xenomai is distributed in the hope that it will be useful, but 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with Xenomai; if not, write to the Free Software 19 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20 | * 02111-1307, USA. 21 | */ 22 | 23 | #ifndef _XENO_ASM_ARM_BITS_INTR_H 24 | #define _XENO_ASM_ARM_BITS_INTR_H 25 | 26 | #include 27 | 28 | static inline void xnarch_relay_tick(void) 29 | { 30 | rthal_irq_host_pend(RTHAL_TIMER_IRQ); 31 | } 32 | 33 | #endif /* !_XENO_ASM_ARM_BITS_INTR_H */ 34 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/nucleus/ppd.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_NUCLEUS_PPD_H 2 | #define _XENO_NUCLEUS_PPD_H 3 | 4 | #include 5 | #include 6 | 7 | struct mm_struct; 8 | 9 | typedef struct xnshadow_ppd_key { 10 | unsigned long muxid; 11 | struct mm_struct *mm; 12 | } xnshadow_ppd_key_t; 13 | 14 | typedef struct xnshadow_ppd_t { 15 | xnshadow_ppd_key_t key; 16 | xnholder_t link; 17 | #define link2ppd(ln) container_of(ln, xnshadow_ppd_t, link) 18 | } xnshadow_ppd_t; 19 | 20 | #define xnshadow_ppd_muxid(ppd) ((ppd)->key.muxid) 21 | 22 | #define xnshadow_ppd_mm(ppd) ((ppd)->key.mm) 23 | 24 | /* Call with nklock locked irqs off. */ 25 | xnshadow_ppd_t *xnshadow_ppd_get(unsigned muxid); 26 | 27 | #endif /* _XENO_NUCLEUS_PPD_H */ 28 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/nucleus/sys_ppd.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_NUCLEUS_SYS_PPD_H 2 | #define _XENO_NUCLEUS_SYS_PPD_H 3 | 4 | #include 5 | #include 6 | 7 | struct xnsys_ppd { 8 | xnshadow_ppd_t ppd; 9 | xnheap_t sem_heap; 10 | #ifdef XNARCH_HAVE_MAYDAY 11 | unsigned long mayday_addr; 12 | #endif 13 | xnarch_atomic_t refcnt; 14 | #define ppd2sys(addr) container_of(addr, struct xnsys_ppd, ppd) 15 | }; 16 | 17 | extern struct xnsys_ppd __xnsys_global_ppd; 18 | 19 | #ifdef CONFIG_XENO_OPT_PERVASIVE 20 | 21 | static inline struct xnsys_ppd *xnsys_ppd_get(int global) 22 | { 23 | xnshadow_ppd_t *ppd; 24 | 25 | if (global || !(ppd = xnshadow_ppd_get(0))) 26 | return &__xnsys_global_ppd; 27 | 28 | return ppd2sys(ppd); 29 | } 30 | 31 | #else /* !CONFIG_XENO_OPT_PERVASIVE */ 32 | 33 | static inline struct xnsys_ppd *xnsys_ppd_get(int global) 34 | { 35 | return &__xnsys_global_ppd; 36 | } 37 | 38 | #endif /* !CONFIG_XENO_OPT_PERVASIVE */ 39 | 40 | #endif /* _XENO_NUCLEUS_SYS_PPD_H */ 41 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/nucleus/system.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published 6 | * by the Free Software Foundation; either version 2 of the License, 7 | * or (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_NUCLEUS_SYSTEM_H 21 | #define _XENO_NUCLEUS_SYSTEM_H 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | #endif /* !_XENO_NUCLEUS_SYSTEM_H */ 30 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/nucleus/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published 6 | * by the Free Software Foundation; either version 2 of the License, 7 | * or (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_NUCLEUS_VERSION_H 21 | #define _XENO_NUCLEUS_VERSION_H 22 | 23 | #define XENO_VERSION(maj,min,rev) (((maj)<<16)|((min)<<8)|(rev)) 24 | 25 | #define XENO_VERSION_CODE XENO_VERSION(CONFIG_XENO_VERSION_MAJOR, \ 26 | CONFIG_XENO_VERSION_MINOR, \ 27 | CONFIG_XENO_REVISION_LEVEL) 28 | 29 | #define XENO_VERSION_NAME "Lies and Truths" 30 | 31 | #define XENO_VERSION_STRING "2.6.3" 32 | 33 | #endif /* _XENO_NUCLEUS_VERSION_H */ 34 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/nucleus/xenomai.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published 6 | * by the Free Software Foundation; either version 2 of the License, 7 | * or (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _XENO_NUCLEUS_XENOMAI_H 21 | #define _XENO_NUCLEUS_XENOMAI_H 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | 30 | #endif /* !_XENO_NUCLEUS_XENOMAI_H */ 31 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/posix/stdio.h: -------------------------------------------------------------------------------- 1 | #ifndef __KERNEL__ 2 | 3 | #pragma GCC system_header 4 | 5 | #include_next 6 | 7 | #ifndef _XENO_POSIX_STDIO_H 8 | #define _XENO_POSIX_STDIO_H 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif /* __cplusplus */ 17 | 18 | int __real_vfprintf(FILE *stream, const char *fmt, va_list args); 19 | 20 | #ifdef CONFIG_XENO_FORTIFY 21 | int __real___vfprintf_chk(FILE *stream, int level, const char *fmt, va_list ap); 22 | #endif 23 | 24 | int __real_vprintf(const char *fmt, va_list args); 25 | 26 | int __real_fprintf(FILE *stream, const char *fmt, ...); 27 | 28 | int __real_printf(const char *fmt, ...); 29 | 30 | int __real_puts(const char *s); 31 | 32 | int __real_fputs(const char *s, FILE *stream); 33 | 34 | int __real_fputc(int c, FILE *stream); 35 | 36 | int __real_putchar(int c); 37 | 38 | size_t __real_fwrite(const void *ptr, size_t sz, size_t nmemb, FILE *stream); 39 | 40 | #ifdef __cplusplus 41 | } 42 | #endif /* __cplusplus */ 43 | 44 | #endif /* _XENO_POSIX_STDIO_H */ 45 | 46 | #endif /* !__KERNEL__ */ 47 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/posix/sys/ioctl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005 Philippe Gerum . 3 | * 4 | * This program is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU General Public License as 6 | * published by the Free Software Foundation; either version 2 of the 7 | * License, or (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 | */ 18 | 19 | #ifndef _XENO_POSIX_SYS_IOCTL_H 20 | #define _XENO_POSIX_SYS_IOCTL_H 21 | 22 | #if !(defined(__KERNEL__) || defined(__XENO_SIM__)) 23 | 24 | #pragma GCC system_header 25 | 26 | #include_next 27 | 28 | #ifdef __cplusplus 29 | extern "C" { 30 | #endif 31 | 32 | int __real_ioctl(int fildes, int request, ...); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif /* !(__KERNEL__ || __XENO_SIM__) */ 39 | 40 | #endif /* _XENO_POSIX_SYS_IOCTL_H */ 41 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/posix/sys/select.h: -------------------------------------------------------------------------------- 1 | #ifndef _XENO_POSIX_SELECT_H 2 | #define _XENO_POSIX_SELECT_H 3 | 4 | #if !(defined(__KERNEL__) || defined(__XENO_SIM__)) 5 | 6 | #pragma GCC system_header 7 | 8 | #include_next 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif 13 | 14 | extern int __real_select (int __nfds, fd_set *__restrict __readfds, 15 | fd_set *__restrict __writefds, 16 | fd_set *__restrict __exceptfds, 17 | struct timeval *__restrict __timeout); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | #endif /* !(__KERNEL__ || __XENO_SIM__) */ 24 | 25 | #endif /* _XENO_POSIX_SELECT_H */ 26 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/posix/syslog.h: -------------------------------------------------------------------------------- 1 | #ifndef SYSLOG_H 2 | #define SYSLOG_H 3 | 4 | #pragma GCC system_header 5 | 6 | #include 7 | #include_next 8 | #include 9 | 10 | #ifdef __cplusplus 11 | extern "C" { 12 | #endif /* __cplusplus */ 13 | 14 | void __real_syslog(int priority, const char *fmt, ...); 15 | 16 | void __real_vsyslog(int priority, const char *fmt, va_list ap); 17 | 18 | #ifdef CONFIG_XENO_FORTIFY 19 | void __real___vsyslog_chk(int priority, int level, const char *fmt, va_list ap); 20 | #endif 21 | 22 | #ifdef __cplusplus 23 | } 24 | #endif /* __cplusplus */ 25 | 26 | #endif /* SYSLOG_H */ 27 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/psos+/asr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published 6 | * by the Free Software Foundation; either version 2 of the License, 7 | * or (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _PSOS_ASR_H 21 | #define _PSOS_ASR_H 22 | 23 | #include 24 | #include 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | void psosasr_init(void); 31 | 32 | void psosasr_cleanup(void); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif /* !_PSOS_ASR_ */ 39 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/psos+/event.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001,2002,2003 Philippe Gerum . 3 | * 4 | * Xenomai is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published 6 | * by the Free Software Foundation; either version 2 of the License, 7 | * or (at your option) any later version. 8 | * 9 | * Xenomai is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with Xenomai; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 17 | * 02111-1307, USA. 18 | */ 19 | 20 | #ifndef _PSOS_EVENT_H 21 | #define _PSOS_EVENT_H 22 | 23 | #include 24 | #include 25 | 26 | typedef struct psosevent { 27 | 28 | u_long events; /* Event flags */ 29 | 30 | xnsynch_t synchbase; 31 | 32 | } psosevent_t; 33 | 34 | #ifdef __cplusplus 35 | extern "C" { 36 | #endif 37 | 38 | void taskev_init(psosevent_t *evgroup); 39 | 40 | void taskev_destroy(psosevent_t *evgroup); 41 | 42 | #ifdef __cplusplus 43 | } 44 | #endif 45 | 46 | #endif /* !_PSOS_EVENT_H */ 47 | -------------------------------------------------------------------------------- /include/xenomai/xenomai/xenomai/xenomai/psos+/long_names.h: -------------------------------------------------------------------------------- 1 | #ifndef LONG_NAMES_H 2 | #define LONG_NAMES_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif /* __cplusplus */ 7 | 8 | const char *__psos_maybe_short_name(char shrt[5], const char *lng); 9 | 10 | #ifdef __cplusplus 11 | } 12 | #endif /* __cplusplus */ 13 | 14 | #endif /* LONG_NAMES_H */ 15 | -------------------------------------------------------------------------------- /lib/xenomai/.goutputstream-AGELHX: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dtank/iec-runtime/d637fe649392b2e88fff7335eb33243c8e5c0c89/lib/xenomai/.goutputstream-AGELHX -------------------------------------------------------------------------------- /lib/xenomai/libanalogy.la: -------------------------------------------------------------------------------- 1 | # libanalogy.la - a libtool library file 2 | # Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.1 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='libanalogy.so.1' 9 | 10 | # Names of this library. 11 | library_names='libanalogy.so.1.0.0 libanalogy.so.1 libanalogy.so' 12 | 13 | # The name of the static archive. 14 | old_library='libanalogy.a' 15 | 16 | # Linker flags that can not go in dependency_libs. 17 | inherited_linker_flags='' 18 | 19 | # Libraries that this one depends upon. 20 | dependency_libs=' -lpthread' 21 | 22 | # Names of additional weak libraries provided by this library 23 | weak_library_names='' 24 | 25 | # Version information for libanalogy. 26 | current=1 27 | age=0 28 | revision=0 29 | 30 | # Is this an already installed library? 31 | installed=yes 32 | 33 | # Should we warn about portability when linking against -modules? 34 | shouldnotlink=no 35 | 36 | # Files to dlopen/dlpreopen 37 | dlopen='' 38 | dlpreopen='' 39 | 40 | # Directory that this library needs to be installed in: 41 | libdir='/usr/xenomai/lib' 42 | -------------------------------------------------------------------------------- /lib/xenomai/libnative.la: -------------------------------------------------------------------------------- 1 | # libnative.la - a libtool library file 2 | # Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.1 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='libnative.so.3' 9 | 10 | # Names of this library. 11 | library_names='libnative.so.3.0.0 libnative.so.3 libnative.so' 12 | 13 | # The name of the static archive. 14 | old_library='libnative.a' 15 | 16 | # Linker flags that can not go in dependency_libs. 17 | inherited_linker_flags='' 18 | 19 | # Libraries that this one depends upon. 20 | dependency_libs=' -lpthread' 21 | 22 | # Names of additional weak libraries provided by this library 23 | weak_library_names='' 24 | 25 | # Version information for libnative. 26 | current=3 27 | age=0 28 | revision=0 29 | 30 | # Is this an already installed library? 31 | installed=yes 32 | 33 | # Should we warn about portability when linking against -modules? 34 | shouldnotlink=no 35 | 36 | # Files to dlopen/dlpreopen 37 | dlopen='' 38 | dlpreopen='' 39 | 40 | # Directory that this library needs to be installed in: 41 | libdir='/usr/xenomai/lib' 42 | -------------------------------------------------------------------------------- /lib/xenomai/libpsos.la: -------------------------------------------------------------------------------- 1 | # libpsos.la - a libtool library file 2 | # Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.1 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='libpsos.so.0' 9 | 10 | # Names of this library. 11 | library_names='libpsos.so.0.0.0 libpsos.so.0 libpsos.so' 12 | 13 | # The name of the static archive. 14 | old_library='libpsos.a' 15 | 16 | # Linker flags that can not go in dependency_libs. 17 | inherited_linker_flags='' 18 | 19 | # Libraries that this one depends upon. 20 | dependency_libs=' -lpthread' 21 | 22 | # Names of additional weak libraries provided by this library 23 | weak_library_names='' 24 | 25 | # Version information for libpsos. 26 | current=0 27 | age=0 28 | revision=0 29 | 30 | # Is this an already installed library? 31 | installed=yes 32 | 33 | # Should we warn about portability when linking against -modules? 34 | shouldnotlink=no 35 | 36 | # Files to dlopen/dlpreopen 37 | dlopen='' 38 | dlpreopen='' 39 | 40 | # Directory that this library needs to be installed in: 41 | libdir='/usr/xenomai/lib' 42 | -------------------------------------------------------------------------------- /lib/xenomai/libpthread_rt.la: -------------------------------------------------------------------------------- 1 | # libpthread_rt.la - a libtool library file 2 | # Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.1 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='libpthread_rt.so.1' 9 | 10 | # Names of this library. 11 | library_names='libpthread_rt.so.1.0.0 libpthread_rt.so.1 libpthread_rt.so' 12 | 13 | # The name of the static archive. 14 | old_library='libpthread_rt.a' 15 | 16 | # Linker flags that can not go in dependency_libs. 17 | inherited_linker_flags='' 18 | 19 | # Libraries that this one depends upon. 20 | dependency_libs=' -lpthread' 21 | 22 | # Names of additional weak libraries provided by this library 23 | weak_library_names='' 24 | 25 | # Version information for libpthread_rt. 26 | current=1 27 | age=0 28 | revision=0 29 | 30 | # Is this an already installed library? 31 | installed=yes 32 | 33 | # Should we warn about portability when linking against -modules? 34 | shouldnotlink=no 35 | 36 | # Files to dlopen/dlpreopen 37 | dlopen='' 38 | dlpreopen='' 39 | 40 | # Directory that this library needs to be installed in: 41 | libdir='/usr/xenomai/lib' 42 | -------------------------------------------------------------------------------- /lib/xenomai/librtdm.la: -------------------------------------------------------------------------------- 1 | # librtdm.la - a libtool library file 2 | # Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.1 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='librtdm.so.1' 9 | 10 | # Names of this library. 11 | library_names='librtdm.so.1.0.0 librtdm.so.1 librtdm.so' 12 | 13 | # The name of the static archive. 14 | old_library='librtdm.a' 15 | 16 | # Linker flags that can not go in dependency_libs. 17 | inherited_linker_flags='' 18 | 19 | # Libraries that this one depends upon. 20 | dependency_libs=' -lpthread' 21 | 22 | # Names of additional weak libraries provided by this library 23 | weak_library_names='' 24 | 25 | # Version information for librtdm. 26 | current=1 27 | age=0 28 | revision=0 29 | 30 | # Is this an already installed library? 31 | installed=yes 32 | 33 | # Should we warn about portability when linking against -modules? 34 | shouldnotlink=no 35 | 36 | # Files to dlopen/dlpreopen 37 | dlopen='' 38 | dlpreopen='' 39 | 40 | # Directory that this library needs to be installed in: 41 | libdir='/usr/xenomai/lib' 42 | -------------------------------------------------------------------------------- /lib/xenomai/libuitron.la: -------------------------------------------------------------------------------- 1 | # libuitron.la - a libtool library file 2 | # Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.1 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='libuitron.so.0' 9 | 10 | # Names of this library. 11 | library_names='libuitron.so.0.0.0 libuitron.so.0 libuitron.so' 12 | 13 | # The name of the static archive. 14 | old_library='libuitron.a' 15 | 16 | # Linker flags that can not go in dependency_libs. 17 | inherited_linker_flags='' 18 | 19 | # Libraries that this one depends upon. 20 | dependency_libs=' -lpthread' 21 | 22 | # Names of additional weak libraries provided by this library 23 | weak_library_names='' 24 | 25 | # Version information for libuitron. 26 | current=0 27 | age=0 28 | revision=0 29 | 30 | # Is this an already installed library? 31 | installed=yes 32 | 33 | # Should we warn about portability when linking against -modules? 34 | shouldnotlink=no 35 | 36 | # Files to dlopen/dlpreopen 37 | dlopen='' 38 | dlpreopen='' 39 | 40 | # Directory that this library needs to be installed in: 41 | libdir='/usr/xenomai/lib' 42 | -------------------------------------------------------------------------------- /lib/xenomai/libvrtx.la: -------------------------------------------------------------------------------- 1 | # libvrtx.la - a libtool library file 2 | # Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.1 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='libvrtx.so.0' 9 | 10 | # Names of this library. 11 | library_names='libvrtx.so.0.0.0 libvrtx.so.0 libvrtx.so' 12 | 13 | # The name of the static archive. 14 | old_library='libvrtx.a' 15 | 16 | # Linker flags that can not go in dependency_libs. 17 | inherited_linker_flags='' 18 | 19 | # Libraries that this one depends upon. 20 | dependency_libs=' -lpthread' 21 | 22 | # Names of additional weak libraries provided by this library 23 | weak_library_names='' 24 | 25 | # Version information for libvrtx. 26 | current=0 27 | age=0 28 | revision=0 29 | 30 | # Is this an already installed library? 31 | installed=yes 32 | 33 | # Should we warn about portability when linking against -modules? 34 | shouldnotlink=no 35 | 36 | # Files to dlopen/dlpreopen 37 | dlopen='' 38 | dlpreopen='' 39 | 40 | # Directory that this library needs to be installed in: 41 | libdir='/usr/xenomai/lib' 42 | -------------------------------------------------------------------------------- /lib/xenomai/libvxworks.la: -------------------------------------------------------------------------------- 1 | # libvxworks.la - a libtool library file 2 | # Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.1 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='libvxworks.so.1' 9 | 10 | # Names of this library. 11 | library_names='libvxworks.so.1.0.0 libvxworks.so.1 libvxworks.so' 12 | 13 | # The name of the static archive. 14 | old_library='libvxworks.a' 15 | 16 | # Linker flags that can not go in dependency_libs. 17 | inherited_linker_flags='' 18 | 19 | # Libraries that this one depends upon. 20 | dependency_libs=' -lpthread' 21 | 22 | # Names of additional weak libraries provided by this library 23 | weak_library_names='' 24 | 25 | # Version information for libvxworks. 26 | current=1 27 | age=0 28 | revision=0 29 | 30 | # Is this an already installed library? 31 | installed=yes 32 | 33 | # Should we warn about portability when linking against -modules? 34 | shouldnotlink=no 35 | 36 | # Files to dlopen/dlpreopen 37 | dlopen='' 38 | dlpreopen='' 39 | 40 | # Directory that this library needs to be installed in: 41 | libdir='/usr/xenomai/lib' 42 | -------------------------------------------------------------------------------- /lib/xenomai/libxenomai.la: -------------------------------------------------------------------------------- 1 | # libxenomai.la - a libtool library file 2 | # Generated by libtool (GNU libtool) 2.4.2 Debian-2.4.2-1.1 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='libxenomai.so.0' 9 | 10 | # Names of this library. 11 | library_names='libxenomai.so.0.0.0 libxenomai.so.0 libxenomai.so' 12 | 13 | # The name of the static archive. 14 | old_library='libxenomai.a' 15 | 16 | # Linker flags that can not go in dependency_libs. 17 | inherited_linker_flags='' 18 | 19 | # Libraries that this one depends upon. 20 | dependency_libs=' -lpthread -lrt' 21 | 22 | # Names of additional weak libraries provided by this library 23 | weak_library_names='' 24 | 25 | # Version information for libxenomai. 26 | current=0 27 | age=0 28 | revision=0 29 | 30 | # Is this an already installed library? 31 | installed=yes 32 | 33 | # Should we warn about portability when linking against -modules? 34 | shouldnotlink=no 35 | 36 | # Files to dlopen/dlpreopen 37 | dlopen='' 38 | dlpreopen='' 39 | 40 | # Directory that this library needs to be installed in: 41 | libdir='/usr/xenomai/lib' 42 | -------------------------------------------------------------------------------- /lib/xenomai/pkgconfig/libxenomai_native.pc: -------------------------------------------------------------------------------- 1 | prefix=/usr/xenomai 2 | exec_prefix=${prefix} 3 | libdir=${exec_prefix}/lib 4 | includedir=${prefix}/include 5 | skin=native 6 | XENO_BASE_CFLAGS=-I${includedir} -D_GNU_SOURCE -D_REENTRANT -D__XENO__ 7 | XENO_BASE_LDFLAGS=-L${libdir} -lxenomai -lpthread -lrt 8 | 9 | Name: xenomai 10 | Description: Xenomai native skin library 11 | Version: 2.6.3 12 | Libs: -l${skin} ${XENO_BASE_LDFLAGS} 13 | Cflags: ${XENO_BASE_CFLAGS} 14 | -------------------------------------------------------------------------------- /lib/xenomai/pkgconfig/libxenomai_posix.pc: -------------------------------------------------------------------------------- 1 | prefix=/usr/xenomai 2 | exec_prefix=${prefix} 3 | libdir=${exec_prefix}/lib 4 | includedir=${prefix}/include 5 | XENO_BASE_CFLAGS=-I${includedir} -D_GNU_SOURCE -D_REENTRANT -D__XENO__ 6 | XENO_POSIX_WRAPPERS=${pc_sysrootdir}${libdir}/posix.wrappers 7 | XENO_POSIX_LDFLAGS=-L${libdir} -lpthread_rt -lxenomai -lpthread -lrt 8 | 9 | Name: xenomai 10 | Description: Xenomai posix skin library 11 | Version: 2.6.3 12 | Libs: -Wl,@${XENO_POSIX_WRAPPERS} ${XENO_POSIX_LDFLAGS} 13 | Cflags: ${XENO_BASE_CFLAGS} -I${includedir}/posix 14 | -------------------------------------------------------------------------------- /lib/xenomai/pkgconfig/libxenomai_psos+.pc: -------------------------------------------------------------------------------- 1 | prefix=/usr/xenomai 2 | exec_prefix=${prefix} 3 | libdir=${exec_prefix}/lib 4 | includedir=${prefix}/include 5 | skin=psos 6 | XENO_BASE_CFLAGS=-I${includedir} -D_GNU_SOURCE -D_REENTRANT -D__XENO__ 7 | XENO_BASE_LDFLAGS=-L${libdir} -lxenomai -lpthread -lrt 8 | 9 | Name: xenomai 10 | Description: Xenomai psos+ skin library 11 | Version: 2.6.3 12 | Libs: -l${skin} ${XENO_BASE_LDFLAGS} 13 | Cflags: ${XENO_BASE_CFLAGS} -I${includedir}/${skin} 14 | -------------------------------------------------------------------------------- /lib/xenomai/pkgconfig/libxenomai_rtdm.pc: -------------------------------------------------------------------------------- 1 | prefix=/usr/xenomai 2 | exec_prefix=${prefix} 3 | libdir=${exec_prefix}/lib 4 | includedir=${prefix}/include 5 | skin=rtdm 6 | XENO_BASE_CFLAGS=-I${includedir} -D_GNU_SOURCE -D_REENTRANT -D__XENO__ 7 | XENO_BASE_LDFLAGS=-L${libdir} -lxenomai -lpthread -lrt 8 | 9 | Name: xenomai 10 | Description: Xenomai RTDM skin library 11 | Version: 2.6.3 12 | Libs: -l${skin} ${XENO_BASE_LDFLAGS} 13 | Cflags: ${XENO_BASE_CFLAGS} 14 | -------------------------------------------------------------------------------- /lib/xenomai/pkgconfig/libxenomai_uitron.pc: -------------------------------------------------------------------------------- 1 | prefix=/usr/xenomai 2 | exec_prefix=${prefix} 3 | libdir=${exec_prefix}/lib 4 | includedir=${prefix}/include 5 | skin=uitron 6 | XENO_BASE_CFLAGS=-I${includedir} -D_GNU_SOURCE -D_REENTRANT -D__XENO__ 7 | XENO_BASE_LDFLAGS=-L${libdir} -lxenomai -lpthread -lrt 8 | 9 | Name: xenomai 10 | Description: Xenomai uitron skin library 11 | Version: 2.6.3 12 | Libs: -l${skin} ${XENO_BASE_LDFLAGS} 13 | Cflags: ${XENO_BASE_CFLAGS} -I${includedir}/${skin} 14 | -------------------------------------------------------------------------------- /lib/xenomai/pkgconfig/libxenomai_vrtx.pc: -------------------------------------------------------------------------------- 1 | prefix=/usr/xenomai 2 | exec_prefix=${prefix} 3 | libdir=${exec_prefix}/lib 4 | includedir=${prefix}/include 5 | skin=vrtx 6 | XENO_BASE_CFLAGS=-I${includedir} -D_GNU_SOURCE -D_REENTRANT -D__XENO__ 7 | XENO_BASE_LDFLAGS=-L${libdir} -lxenomai -lpthread -lrt 8 | 9 | Name: xenomai 10 | Description: Xenomai vrtx skin library 11 | Version: 2.6.3 12 | Libs: -l${skin} ${XENO_BASE_LDFLAGS} 13 | Cflags: ${XENO_BASE_CFLAGS} -I${includedir}/${skin} 14 | -------------------------------------------------------------------------------- /lib/xenomai/pkgconfig/libxenomai_vxworks.pc: -------------------------------------------------------------------------------- 1 | prefix=/usr/xenomai 2 | exec_prefix=${prefix} 3 | libdir=${exec_prefix}/lib 4 | includedir=${prefix}/include 5 | skin=vxworks 6 | XENO_BASE_CFLAGS=-I${includedir} -D_GNU_SOURCE -D_REENTRANT -D__XENO__ 7 | XENO_BASE_LDFLAGS=-L${libdir} -lxenomai -lpthread -lrt 8 | 9 | Name: xenomai 10 | Description: Xenomai vxworks skin library 11 | Version: 2.6.3 12 | Libs: -l${skin} ${XENO_BASE_LDFLAGS} 13 | Cflags: ${XENO_BASE_CFLAGS} -I${includedir}/${skin} 14 | -------------------------------------------------------------------------------- /onekey.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | EXE=./iec-runtime 4 | OBJ=./plc.bin 5 | NFSDIR=~/nfs 6 | TESTDIR=./test/ 7 | GENOBJ=./translator.py 8 | 9 | # Step1: rebuild iec-runtime 10 | make rebuild 11 | # Step2: generate obj file 12 | ${GENOBJ} < ${TESTDIR}"$1".test 13 | # Step3: move iec-runtime & obj file to NFS directory 14 | mv ${EXE} ${NFSDIR} 15 | mv ${OBJ} ${NFSDIR} 16 | -------------------------------------------------------------------------------- /src/callstk.cc: -------------------------------------------------------------------------------- 1 | #include "callstk.h" 2 | #include "syslimit.h" 3 | #include "logger.h" 4 | 5 | int cs_init(CStack *stk, uint16_t cap) { 6 | assert(stk != NULL); 7 | assert(cap <= MAX_CS_CAP); /* guaranteed by verifier */ 8 | 9 | stk->capacity = cap+1; 10 | stk->top = 1; /* MUST be 1(reduce bound case for main()) */ 11 | stk->base = new SFrame[stk->capacity]; 12 | if (stk->base == NULL) { 13 | LOGGER_ERR(EC_OOM, "initializing calling stack"); 14 | return -1; 15 | } 16 | return 0; 17 | } 18 | //int cs_push(CStack *stk, SFrame *frame) { 19 | //assert(stk != NULL); 20 | //assert(frame != NULL); 21 | 22 | //if (stk->top == stk->capacity) { 23 | //LOGGER_ERR(EC_CS_FULL, ""); //TODO expand capacity automatically 24 | //return -1; 25 | //} 26 | //stk->base[stk->top] = *frame; 27 | //stk->top++; 28 | //return 0; 29 | //} 30 | //int cs_pop(CStack *stk) { 31 | //assert(stk != NULL); 32 | 33 | //if (stk->top == 0) { 34 | //LOGGER_ERR(EC_CS_EMPTY, ""); 35 | //return -1; 36 | //} 37 | //if (stk->base[stk->top].reg_base != NULL) { 38 | //delete[] stk->base[stk->top-1].reg_base; 39 | //} 40 | //stk->top--; 41 | //return 0; 42 | //} 43 | -------------------------------------------------------------------------------- /src/istring.cc: -------------------------------------------------------------------------------- 1 | #include 2 | #include "istring.h" 3 | #include "syslimit.h" 4 | #include "logger.h" 5 | 6 | 7 | int sp_init(StrPool *sp, uint32_t size) { 8 | assert(sp != NULL); 9 | assert(size <= MAX_SP_SIZE); /* guaranteed by verifier */ 10 | 11 | sp->size = size; 12 | sp->index = 0; 13 | sp->base = new char[size]; 14 | if (sp->base == NULL) { 15 | LOGGER_ERR(EC_OOM, "initializing string pool"); 16 | return -1; 17 | } 18 | return 0; 19 | } 20 | char *sp_add(StrPool *sp, const char *str, uint32_t size) { /* size include '\0' */ 21 | assert(sp != NULL); 22 | assert(str != NULL); 23 | 24 | if (sp->size < sp->index+size) { 25 | LOGGER_ERR(EC_SP_FULL, ""); //TODO expand capacity automatically 26 | return NULL; 27 | } 28 | strcpy(&sp->base[sp->index], str); 29 | sp->index += size; 30 | return &sp->base[sp->index-size]; 31 | } 32 | void sp_clean(StrPool *sp) { 33 | assert(sp != NULL); 34 | 35 | sp->size = 0; 36 | sp->index = 0; 37 | if (sp->base != NULL) { 38 | delete[] sp->base; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main.cc: -------------------------------------------------------------------------------- 1 | #include /* required */ 2 | #include 3 | 4 | #include "loader.h" 5 | #include "executor.h" 6 | #include "io.h" 7 | #include "servo.h" 8 | #include "logger.h" 9 | 10 | extern IOConfig g_ioconfig; 11 | extern ServoConfig g_svconfig; 12 | TaskList plc_task; 13 | 14 | void sys_init() { 15 | FILE *fplc = fopen("plc.bin", "rb"); 16 | verify_obj(fplc); 17 | load_io_config(fplc, &g_ioconfig); 18 | io_task_init(&g_ioconfig); 19 | load_servo_config(fplc, &g_svconfig); 20 | servo_task_init(&g_svconfig); 21 | load_task_list(fplc, &plc_task); 22 | plc_task_init(&plc_task); 23 | fclose(fplc); 24 | } 25 | void sys_start() { 26 | io_task_start(&g_ioconfig); 27 | //servo_task_start(&g_svconfig); 28 | plc_task_start(&plc_task); 29 | } 30 | void sys_exit() { 31 | io_task_delete(); 32 | //servo_task_delete(); 33 | plc_task_delete(&plc_task); 34 | } 35 | int main(int argc, char* argv[]) 36 | { 37 | //Avoids memory swapping for this program 38 | mlockall(MCL_CURRENT|MCL_FUTURE); 39 | 40 | sys_init(); 41 | sys_start(); 42 | pause(); 43 | sys_exit(); 44 | 45 | return 0; 46 | } 47 | -------------------------------------------------------------------------------- /src/rc.cc: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "rc.h" 4 | #include "logger.h" 5 | 6 | static RT_TASK rc_task; 7 | RT_HEAP rc_heap_desc; 8 | char *rc_shm; 9 | 10 | static void interp_calculate(void *config) { 11 | LOGGER_INF("STUB: Calculate interpolation value...", 0); 12 | } 13 | static void rc_task_create() { 14 | if (rt_task_create(&rc_task, RC_TASK_NAME, 0, RC_TASK_PRIORITY, 0)) { 15 | LOGGER_ERR(EC_RC_TASK_CREATE, ""); 16 | } 17 | } 18 | void rc_task_init(RobotConfig *config) { 19 | int size = config->axis_count * sizeof(INTERP_DATA); 20 | rt_heap_create(&rc_heap_desc, "rc_shm", size, H_SHARED); 21 | rt_heap_alloc(&rc_heap_desc, size, TM_INFINITE, (void **)&rc_shm); 22 | rc_task_create(); 23 | } 24 | void rc_task_start(RobotConfig *config) { 25 | if (rt_task_start(&rc_task, &interp_calculate, (void *)config)) { 26 | LOGGER_ERR(EC_RC_TASK_START, ""); 27 | } 28 | } 29 | void rc_task_delete() { 30 | if (rt_task_delete(&rc_task)) { 31 | LOGGER_ERR(EC_RC_TASK_DELETE, ""); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/servo.cc: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "servo.h" 4 | #include "logger.h" 5 | 6 | static RT_TASK servo_task; 7 | RT_HEAP servo_heap_desc; 8 | char *servo_shm; 9 | ServoConfig *g_svconfig; 10 | 11 | 12 | static void servo_update(void *config) { 13 | ServoConfig *servo_config = (ServoConfig *)config; 14 | rt_task_set_periodic(NULL, TM_NOW, servo_config->update_interval); 15 | while (1) { 16 | rt_task_wait_period(NULL); 17 | LOGGER_INF("STUB: Update servo data...", 0); 18 | } 19 | } 20 | static void servo_task_create() { 21 | if (rt_task_create(&servo_task, SERVO_TASK_NAME, 0, SERVO_TASK_PRIORITY, 0)) { 22 | LOGGER_ERR(EC_SERVO_TASK_CREATE, ""); 23 | } 24 | } 25 | 26 | void servo_task_init(ServoConfig *config) { 27 | LOGGER_INF("STUB: Configure servo driver...", 0); 28 | int size = config->axis_count * sizeof(AXIS_DATA); 29 | rt_heap_create(&servo_heap_desc, "servo_shm", size, H_SHARED); 30 | rt_heap_alloc(&servo_heap_desc, size, TM_INFINITE, (void **)&servo_shm); 31 | servo_task_create(); 32 | } 33 | void servo_task_start(ServoConfig *config) { 34 | if (rt_task_start(&servo_task, &servo_update, (void *)config)) { 35 | LOGGER_ERR(EC_SERVO_TASK_START, ""); 36 | } 37 | } 38 | 39 | void servo_task_delete() { 40 | if (rt_task_delete(&servo_task)) { 41 | LOGGER_ERR(EC_SERVO_TASK_DELETE, ""); 42 | } 43 | } 44 | --------------------------------------------------------------------------------