50 #include "../arch/tn_arch_detect.h" 204 # define TN_NULL ((void *)0) 211 # define TN_BOOL bool 219 # define TN_TRUE (1 == 1) 224 # define TN_FALSE (1 == 0) 231 #define TN_MAKE_ALIG_SIZE(a) \ 232 (((a) + (sizeof(TN_UWord) - 1)) & (~(sizeof(TN_UWord) - 1))) 235 #if (!defined TN_API_MAKE_ALIG_ARG) 236 # error TN_API_MAKE_ALIG_ARG is not defined 237 #elif (!defined TN_API_MAKE_ALIG_ARG__TYPE) 238 # error TN_API_MAKE_ALIG_ARG__TYPE is not defined 239 #elif (!defined TN_API_MAKE_ALIG_ARG__SIZE) 240 # error TN_API_MAKE_ALIG_ARG__SIZE is not defined 252 #if (TN_API_MAKE_ALIG_ARG == TN_API_MAKE_ALIG_ARG__TYPE) 253 # define TN_MAKE_ALIG(a) TN_MAKE_ALIG_SIZE(sizeof(a)) 254 #elif (TN_API_MAKE_ALIG_ARG == TN_API_MAKE_ALIG_ARG__SIZE) 255 # define TN_MAKE_ALIG(a) TN_MAKE_ALIG_SIZE(a) 257 # error wrong TN_API_MAKE_ALIG_ARG 263 #define _TN_UNUSED(x) (void)(x) 265 #define _TN_FATAL_ERROR(error_msg) _TN_FATAL_ERRORF(error_msg, NULL) 275 #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.
unsigned long TN_TickCnt
Type for system tick count, it is used by the kernel to represent absolute tick count value as well a...
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...
Wrong task state error: requested operation requires different task state.
Object for whose event task was waiting is deleted.
Timeout (consult TN_TickCnt for details).
void() TN_TaskBody(void *param)
Prototype for task body function.