50 #include "../arch/tn_arch_detect.h"
197 # define TN_NULL ((void *)0)
207 # define TN_TRUE (1 == 1)
212 # define TN_FALSE (1 == 0)
219 #define TN_MAKE_ALIG_SIZE(a) \
220 (((a) + (sizeof(TN_UWord) - 1)) & (~(sizeof(TN_UWord) - 1)))
223 #if (!defined TN_API_MAKE_ALIG_ARG)
224 # error TN_API_MAKE_ALIG_ARG is not defined
225 #elif (!defined TN_API_MAKE_ALIG_ARG__TYPE)
226 # error TN_API_MAKE_ALIG_ARG__TYPE is not defined
227 #elif (!defined TN_API_MAKE_ALIG_ARG__SIZE)
228 # error TN_API_MAKE_ALIG_ARG__SIZE is not defined
240 #if (TN_API_MAKE_ALIG_ARG == TN_API_MAKE_ALIG_ARG__TYPE)
241 # define TN_MAKE_ALIG(a) TN_MAKE_ALIG_SIZE(sizeof(a))
242 #elif (TN_API_MAKE_ALIG_ARG == TN_API_MAKE_ALIG_ARG__SIZE)
243 # define TN_MAKE_ALIG(a) TN_MAKE_ALIG_SIZE(a)
245 # error wrong TN_API_MAKE_ALIG_ARG
258 #endif // _TN_COMMON_H
Wrong context error: returned if function is called from non-acceptable context.
Returned when user tries to perform some operation on invalid object (mutex, semaphore, etc).
Task was released from waiting forcibly because some other task called tn_task_release_wait() ...
id for fixed memory pools
TN_RCode
Result code returned by kernel services.
TN_ObjId
Magic number for object validity verification TODO: use TN_UWord here instead of unsigned int...
unsigned long TN_Timeout
The value representing maximum number of system ticks to wait.
This code is returned in the following cases:
Dispatch configuration: set predefined options, include user-provided cfg file as well as default cfg...
Internal kernel error, should never be returned by kernel services.
This code is returned by most of the kernel functions when wrong params were given to function...
void( TN_TaskBody)(void *param)
Prototype for task body function.
Wrong task state error: requested operation requires different task state.
Object for whose event task was waiting is deleted.
Timeout (consult TN_Timeout for details).