linux changes adapted
This commit is contained in:
parent
f2ba653833
commit
3ee25785a2
@ -1,4 +1,4 @@
|
|||||||
#include "../../osal/linux/BinarySemaphore.h"
|
#include "BinarySemaphore.h"
|
||||||
#include "../../serviceinterface/ServiceInterfaceStream.h"
|
#include "../../serviceinterface/ServiceInterfaceStream.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
#include <fsfw/timemanager/Stopwatch.h>
|
|
||||||
#include "../../serviceinterface/ServiceInterfaceStream.h"
|
#include "../../serviceinterface/ServiceInterfaceStream.h"
|
||||||
#include "../../timemanager/Clock.h"
|
#include "../../timemanager/Clock.h"
|
||||||
|
|
||||||
@ -86,15 +85,16 @@ ReturnValue_t Clock::getUptime(timeval* uptime) {
|
|||||||
return HasReturnvaluesIF::RETURN_OK;
|
return HasReturnvaluesIF::RETURN_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t Clock::getUptimeSeconds() {
|
// Wait for new FSFW Clock function delivering seconds uptime.
|
||||||
//TODO This is not posix compatible and delivers only seconds precision
|
//uint32_t Clock::getUptimeSeconds() {
|
||||||
struct sysinfo sysInfo;
|
// //TODO This is not posix compatible and delivers only seconds precision
|
||||||
int result = sysinfo(&sysInfo);
|
// struct sysinfo sysInfo;
|
||||||
if(result != 0){
|
// int result = sysinfo(&sysInfo);
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
// if(result != 0){
|
||||||
}
|
// return HasReturnvaluesIF::RETURN_FAILED;
|
||||||
return sysInfo.uptime;
|
// }
|
||||||
}
|
// return sysInfo.uptime;
|
||||||
|
//}
|
||||||
|
|
||||||
ReturnValue_t Clock::getUptime(uint32_t* uptimeMs) {
|
ReturnValue_t Clock::getUptime(uint32_t* uptimeMs) {
|
||||||
timeval uptime;
|
timeval uptime;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include "../../osal/linux/Mutex.h"
|
#include "Mutex.h"
|
||||||
#include "../../serviceinterface/ServiceInterfaceStream.h"
|
#include "../../serviceinterface/ServiceInterfaceStream.h"
|
||||||
#include "../../timemanager/Clock.h"
|
#include "../../timemanager/Clock.h"
|
||||||
|
|
||||||
|
@ -1,12 +1,8 @@
|
|||||||
#ifndef OS_LINUX_MUTEX_H_
|
#ifndef FSFW_OSAL_LINUX_MUTEX_H_
|
||||||
#define OS_LINUX_MUTEX_H_
|
#define FSFW_OSAL_LINUX_MUTEX_H_
|
||||||
|
|
||||||
#include "../../ipc/MutexIF.h"
|
#include "../../ipc/MutexIF.h"
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
class Mutex : public MutexIF {
|
class Mutex : public MutexIF {
|
||||||
public:
|
public:
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
|
#include "Mutex.h"
|
||||||
|
|
||||||
#include "../../ipc/MutexFactory.h"
|
#include "../../ipc/MutexFactory.h"
|
||||||
#include "../../osal/linux/Mutex.h"
|
|
||||||
|
|
||||||
//TODO: Different variant than the lazy loading in QueueFactory. What's better and why?
|
//TODO: Different variant than the lazy loading in QueueFactory. What's better and why?
|
||||||
MutexFactory* MutexFactory::factoryInstance = new MutexFactory();
|
MutexFactory* MutexFactory::factoryInstance = new MutexFactory();
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
|
#include "PosixThread.h"
|
||||||
|
|
||||||
#include "../../serviceinterface/ServiceInterfaceStream.h"
|
#include "../../serviceinterface/ServiceInterfaceStream.h"
|
||||||
#include "../../osal/linux/PosixThread.h"
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#include "../../tasks/SemaphoreFactory.h"
|
|
||||||
#include "BinarySemaphore.h"
|
#include "BinarySemaphore.h"
|
||||||
#include "CountingSemaphore.h"
|
#include "CountingSemaphore.h"
|
||||||
|
|
||||||
|
#include "../../tasks/SemaphoreFactory.h"
|
||||||
#include "../../serviceinterface/ServiceInterfaceStream.h"
|
#include "../../serviceinterface/ServiceInterfaceStream.h"
|
||||||
|
|
||||||
SemaphoreFactory* SemaphoreFactory::factoryInstance = nullptr;
|
SemaphoreFactory* SemaphoreFactory::factoryInstance = nullptr;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "../../osal/linux/FixedTimeslotTask.h"
|
#include "FixedTimeslotTask.h"
|
||||||
#include "../../osal/linux/PeriodicPosixTask.h"
|
#include "PeriodicPosixTask.h"
|
||||||
|
|
||||||
#include "../../tasks/TaskFactory.h"
|
#include "../../tasks/TaskFactory.h"
|
||||||
#include "../../returnvalues/HasReturnvaluesIF.h"
|
#include "../../returnvalues/HasReturnvaluesIF.h"
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
|
#include "Timer.h"
|
||||||
#include "../../serviceinterface/ServiceInterfaceStream.h"
|
#include "../../serviceinterface/ServiceInterfaceStream.h"
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include "../../osal/linux/Timer.h"
|
|
||||||
|
|
||||||
Timer::Timer() {
|
Timer::Timer() {
|
||||||
sigevent sigEvent;
|
sigevent sigEvent;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user