Updated FSFW to upstream development #5

Manually merged
muellerr merged 103 commits from mueller/master into development 2021-03-20 15:54:34 +01:00
Showing only changes of commit 778ef4ef23 - Show all commits

View File

@ -57,10 +57,8 @@ void PosixThread::suspend() {
void PosixThread::resume(){
/* Signal the thread to start. Makes sense to call kill to start or? ;)
*
* According to Posix raise(signal) will call pthread_kill(pthread_self(), sig),
* but as the call must be done from the thread itsself this is not possible here
*/
According to POSIX raise(signal) will call pthread_kill(pthread_self(), sig),
but as the call must be done from the thread itself this is not possible here */
pthread_kill(thread,SIGUSR1);
}
@ -68,7 +66,7 @@ bool PosixThread::delayUntil(uint64_t* const prevoiusWakeTime_ms,
const uint64_t delayTime_ms) {
uint64_t nextTimeToWake_ms;
bool shouldDelay = false;
//Get current Time
/* Get current Time */
const uint64_t currentTime_ms = getCurrentMonotonicTimeMs();
/* Generate the tick time at which the task wants to wake. */
nextTimeToWake_ms = (*prevoiusWakeTime_ms) + delayTime_ms;
@ -102,7 +100,7 @@ bool PosixThread::delayUntil(uint64_t* const prevoiusWakeTime_ms,
PosixThread::sleep(sleepTime * 1000000ull);
return true;
}
//We are shifting the time in case the deadline was missed like rtems
/* We are shifting the time in case the deadline was missed like RTEMS */
(*prevoiusWakeTime_ms) = currentTime_ms;
return false;
@ -125,10 +123,10 @@ void PosixThread::createTask(void* (*fnc_)(void*), void* arg_) {
#endif
/*
* The attr argument points to a pthread_attr_t structure whose contents
are used at thread creation time to determine attributes for the new
thread; this structure is initialized using pthread_attr_init(3) and
related functions. If attr is NULL, then the thread is created with
default attributes.
* are used at thread creation time to determine attributes for the new
* thread; this structure is initialized using pthread_attr_init(3) and
* related functions. If attr is NULL, then the thread is created with
* default attributes.
*/
pthread_attr_t attributes;
int status = pthread_attr_init(&attributes);