linux important bugfix and general improvements
This commit is contained in:
@ -1,12 +1,11 @@
|
||||
#ifndef FRAMEWORK_OSAL_LINUX_POSIXTHREAD_H_
|
||||
#define FRAMEWORK_OSAL_LINUX_POSIXTHREAD_H_
|
||||
|
||||
#include <pthread.h>
|
||||
#include <sched.h>
|
||||
#include <signal.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <framework/returnvalues/HasReturnvaluesIF.h>
|
||||
#include <pthread.h>
|
||||
#include <signal.h>
|
||||
#include <cstdlib>
|
||||
#include <unistd.h>
|
||||
|
||||
class PosixThread {
|
||||
public:
|
||||
@ -54,21 +53,24 @@ protected:
|
||||
pthread_t thread;
|
||||
|
||||
/**
|
||||
* @brief Function that has to be called by derived class because the derived class pointer has to be valid as argument
|
||||
* @details This function creates a pthread with the given parameters. As the function requires a pointer to the derived object
|
||||
* it has to be called after the this pointer of the derived object is valid. Sets the taskEntryPoint as
|
||||
* function to be called by new a thread.
|
||||
* @param name_ Name of the task
|
||||
* @param priority_ Priority of the task according to POSIX
|
||||
* @param stackSize_ Size of the stack attached to that task
|
||||
* @param arg_ argument of the taskEntryPoint function, needs to be this pointer of derived class
|
||||
* @brief Function that has to be called by derived class because the
|
||||
* derived class pointer has to be valid as argument
|
||||
* @details
|
||||
* This function creates a pthread with the given parameters. As the
|
||||
* function requires a pointer to the derived object it has to be called
|
||||
* after the this pointer of the derived object is valid.
|
||||
* Sets the taskEntryPoint as function to be called by new a thread.
|
||||
* @param fnc_ Function which will be executed by the thread.
|
||||
* @param arg_
|
||||
* argument of the taskEntryPoint function, needs to be this pointer
|
||||
* of derived class
|
||||
*/
|
||||
void createTask(void* (*fnc_)(void*),void* arg_);
|
||||
|
||||
private:
|
||||
char name[10];
|
||||
char name[16];
|
||||
int priority;
|
||||
size_t stackSize;
|
||||
size_t stackSize = 0;
|
||||
};
|
||||
|
||||
#endif /* FRAMEWORK_OSAL_LINUX_POSIXTHREAD_H_ */
|
||||
|
Reference in New Issue
Block a user