40#if defined(INOS_DESKTOP)
42#include <condition_variable>
154 #if defined(INOS_DESKTOP)
182 eTskTypeResource = 1,
184 eTskTypeApplication = 3,
185 eTskTypeCommunication = 4,
186 eTskTypeRealtime = 5,
187 eTskTypeInterrupt = 6,
188 eTskTypeBackground = 7,
191 eTskTypeReserved0 = 10,
192 eTskTypeReserved1 = 11,
223#if defined(INOS_TIMINIG_CHECKS_SUSPEND)
248 friend class CINOSMcLua;
249 friend class CINOSMcMessage;
254 friend class CINCOObject;
255 friend class CINCOProcedure;
263 friend class CINOSHwTarget;
303 #if defined (INOS_DESKTOP)
304 #if defined (INOS_WINDOWS)
307 friend long Sleep(
long aTime);
326 friend class CINOSTaskExMsgTest;
331 #if defined(INOS_TESTING)
469#if defined(INCO_RETRY_AWARE_GETVARIABLE)
478 # if defined(INCO_DEPRECATED_CALLPROCEDURE_ERRORS)
486 void SetError(uint32
aError)
491 void SetId(uint32
aId)
497 uint32 GetState ()
const
499 void SetState(uint16
aState)
516 uint8 GetOversampling()
572 char* GetName()
const
646 #if !defined(INOS_DESKTOP)
651 #if defined(INOS_CPU_CORTEXA9)
652 asm volatile (
"mov %0,sp" :
"=r" (
uSp));
653 #elif defined(INOS_CPU_CORTEXA72)
654 asm volatile (
"mov %0,sp" :
"=r" (
uSp));
656 asm volatile (
"mr %0,1" :
"=r" (
uSp));
671#ifdef INOS_STACKPROTECTION
691 friend long Sleep(
long aTime);
704 #ifdef INOS_EXCEPTION_MUTEX
719 const uint32*
pSrc =
reinterpret_cast<const uint32*
>(&
auBusTicks);
732 void*
operator new(
size_t aSize);
733 void operator delete(
void*
aPtr);
752 virtual void SetCallResult(CMcResult
aResult);
754 virtual CMcResult GetCallResult();
766 #ifdef INOS_MULTICORE_KERNEL
917 #ifdef INOS_MULTICORE_KERNEL
927 #if defined(INOS_DESKTOP)
931 friend void Relinquish();
932 friend void ChangePriority(uint32
auPriority);
935 std::condition_variable_any
m_Resume;
957 alignas(4) inosName128 m_cName = {0};
961 std::function<
void(
void*)> m_Function;
967 #if !defined(INOS_DESKTOP) && defined(INOS_THREADLOCAL)
Definition cinostaskex.h:2713
Definition inos_syn.h:368
Definition inoskernel.h:239
Definition cinosmcmodule.h:1900
Definition inos_syn.h:235
Definition cinosmutex.h:36
Definition cinossiotftexp.h:731
Definition cinostaskex.h:396
Definition cinostaskex.h:966
Definition cinostask.h:981
CINOSTaskType(CINOSTask::ETskType aeType)
Set task type to the requested value.
Definition cinostask.h:989
CINOSTask::ETskType m_eType
original type
Definition cinostask.h:1002
~CINOSTaskType()
Restore original type.
Definition cinostask.h:994
Definition cinostask.h:52
virtual void Exit()
Terminate myself. Exit code is INOS_OK or the code previously set with SetExitCode.
virtual ~CINOSTask()
Destroy task.
virtual void Exit(uint32 auExitCode)
Terminate myself.
INOS_INLINE ETskType SetTskType(ETskType aeType)
Set task type.
Definition cinostask.h:208
CINOSTask(const char *apName, std::function< void(void *)> aFunction, void *apParam=nullptr, uint8 auPriority=DF_INOS_TASK_PRIO_LOWEST)
Create a task with given properties. One needs to Resume the task after creation to get it running.
ETskType
Task types.
Definition cinostask.h:180
virtual uint32 Shutdown(CINOSSync *apSync=DF_INOS_SYNCHRONOUS)
Shutdown task, used to shutdown a foreign task.
virtual void SetExitCode(uint32 auExitCode)
Set exit code.
Definition cinostask.h:135
virtual void ClrSuspendHook()
Clear Suspend hook.
Definition cinostask.h:166
INOS_INLINE ETskType GetTskType()
Get task type.
Definition cinostask.h:201
virtual uint32 GetExitCode()
Get exit code.
Definition cinostask.h:140
virtual void SetSuspendHook(void *apSuspendHook)
Set Suspend hook.
Definition cinostask.h:152
virtual bool CheckShutdown()
Check if a shutdown is pending.
Definition cinostask.h:146
virtual void Action()
Task action loop, needs to be overwritten by the user. For more info, see section Creation.
virtual void * GetSuspendHook()
Get Suspend hook if any.
Definition cinostask.h:173
CINOSTask(std::function< void(void *)> aFunction, void *apParam=nullptr, uint8 auPriority=DF_INOS_TASK_PRIO_LOWEST)
Create a task with given properties. One needs to Resume the task after creation to get it running.
CINOSTask(char *apName=nullptr, uint32 auStackSize=defDefaultStackSize, uint32 auPriority=DF_INOS_TASK_PRIO_LOWEST, bool abFloatingPoint=true, uint32 auTimeSlice=defDefaultTimeSlice, bool abInterruptsDisabled=false, void *apHandler=0, void *apObject=0)
Create a task with given properties. One needs to Resume the task after creation to get it running.
virtual uint32 Join()
Join task or in other words, wait till it terminates.
virtual void Detach()
Detach task from parent. One uses this method if one doesn't want this task to be shut down if the pa...
#define DF_INOS_TASK_PRIO_LOWEST
Definition inosdefine.h:187
#define INOS_INLINE
Definition inosdefine.h:60
#define DF_INOS_CORE_DEFAULT
Definition inosdefine.h:170
#define DF_INOS_SYNCHRONOUS
Definition inosmacro.h:332
Definition inostype.h:192