Merge pull request 'small improvements for Linux' (#407) from mueller/linux-small-improvements into development
Reviewed-on: fsfw/fsfw#407
This commit is contained in:
commit
17adb2cc3e
@ -40,6 +40,13 @@
|
||||
//! Specify whether a special mode store is used for Subsystem components.
|
||||
#define FSFW_USE_MODESTORE 0
|
||||
|
||||
//! Defines if the real time scheduler for linux should be used.
|
||||
//! If set to 0, this will also disable priority settings for linux
|
||||
//! as most systems will not allow to set nice values without privileges
|
||||
//! For embedded linux system set this to 1.
|
||||
//! If set to 1 the binary needs "cap_sys_nice=eip" privileges to run
|
||||
#define FSFW_USE_REALTIME_FOR_LINUX 1
|
||||
|
||||
namespace fsfwconfig {
|
||||
//! Default timestamp size. The default timestamp will be an eight byte CDC
|
||||
//! short timestamp.
|
||||
@ -58,12 +65,6 @@ static constexpr uint8_t FSFW_CSB_FIFO_DEPTH = 6;
|
||||
|
||||
static constexpr size_t FSFW_PRINT_BUFFER_SIZE = 124;
|
||||
|
||||
//! Defines if the real time scheduler for linux should be used.
|
||||
//! If set to 0, this will also disable priority settings for linux
|
||||
//! as most systems will not allow to set nice values without privileges
|
||||
//! For embedded linux system set this to 1.
|
||||
//! If set to 1 the binary needs "cap_sys_nice=eip" privileges to run
|
||||
#define FSFW_USE_REALTIME_FOR_LINUX 1
|
||||
}
|
||||
|
||||
#endif /* CONFIG_FSFWCONFIG_H_ */
|
||||
|
@ -223,8 +223,16 @@ void PosixThread::createTask(void* (*fnc_)(void*), void* arg_) {
|
||||
status = pthread_create(&thread,&attributes,fnc_,arg_);
|
||||
if(status != 0){
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "Posix Thread create failed with: " <<
|
||||
sif::error << "PosixThread::createTask: Failed with: " <<
|
||||
strerror(status) << std::endl;
|
||||
sif::error << "For FSFW_USE_REALTIME_FOR_LINUX == 1 make sure to call " <<
|
||||
"\"all sudo setcap 'cap_sys_nice=eip'\" on the application or set "
|
||||
"/etc/security/limit.conf" << std::endl;
|
||||
#else
|
||||
sif::printError("PosixThread::createTask: Create failed with: %s\n", strerror(status));
|
||||
sif::printError("For FSFW_USE_REALTIME_FOR_LINUX == 1 make sure to call "
|
||||
"\"all sudo setcap 'cap_sys_nice=eip'\" on the application or set "
|
||||
"/etc/security/limit.conf\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "../common/tcpipHelpers.h"
|
||||
|
||||
#include "../../serviceinterface/ServiceInterface.h"
|
||||
#include "../../tasks/TaskFactory.h"
|
||||
|
||||
#include <errno.h>
|
||||
|
Loading…
Reference in New Issue
Block a user