XDK API  3.6.0
Documentation
Serval_Thread.h File Reference

An interface to platform specific thread handling functions which are needed to implement the multi-threading safety of the stack. More...

#include <PThreading.h>
+ Include dependency graph for Serval_Thread.h:

Detailed Description

This header includes the header PThreading.h which must be provided by the PAL implementation. This header also contains pre-processor directives to double-check the right content of PThreading.h.

In the following we document the required content of PThreading.h.

#define SERVAL_MUTEX_MODE_ENABLE
#define SERVAL_MUTEX_MODE_DISABLE
#define SERVAL_MUTEX_MODE_TEST
An enumeration of the supported mutex modes given as numbers e.g. 0, 1, 2. It is used by the stack along with the macro SERVAL_MUTEX_SET_MODE(mode).

#define SERVAL_MUTEX_SET_MODE(mode)
this macro is for testing only and by this optional by this, this macro may be implemented as empty and this macro has only an effect when the code is compiled in TRACE or DEBUG Mode

#define SERVAL_MUTEX_EXTERN(mutex)
declares the datatype of mutex as external. for use in headers, if mutex is used more as in one module this macro must be implemented in the PAL

#define SERVAL_MUTEX_INSTANCE(mutex)
declares the datatype for use in data declaration section of module source file this macro must be implemented in the PAL

#define SERVAL_MUTEX_INIT()
initalizes the global data of mutex module this macro must be implemented in the PAL

#define SERVAL_MUTEX_CREATE(mutex)
creates the operating system resources for this mutex this macro must be implemented in the PAL

#define SERVAL_MUTEX_LOCK(mutex)
locks the mutex this macro must be implemented in the PAL

#define SERVAL_MUTEX_UNLOCK(mutex)
locks the mutex this macro must be implemented in the PAL

#define SERVAL_MUTEX_GET_ERROR_COUNT(mutex)
this macro is for testing only and by this optional by this, this macro may be implemented as empty (returns 0) it gets the count of bad multithreading access of this mutex (error counter)

#define SERVAL_MUTEX_GET_SUM_ERROR_COUNT()
this macro is for testing only and by this optional by this, this macro may be implemented as empty (returns 0) it gets the count of bad multithreading access of all mutexes of the stack together (sum error counter)

#define SERVAL_MUTEX_IS_TRACE_LOCK()
this macro is for testing only and by this optional by this, this macro may be implemented as empty (returns 0) this macro only valid for Logging Module. Mutex Tracing would cause deadlock, because logging itself use mutex. when macro returns 1 means: logging should not use mutex

#define SERVAL_MUTEX_SET_NO_TRACE(mutex,noTrace)
this macro is for testing only and by this optional by this, this macro may be implemented as empty (returns 0) no mutex tracing for this specific mutex. It is mostly for the logging mutex to reduce logging.

#define SERVAL_THREAD_GET_ID()
this macro is for testing only and by this optional it returns the thread id of calling thread environment

#define SERVAL_SLEEP_MS(ms)
this macro is for testing only and by this optional it sets the calling thread into sleep for ms milliseconds

#define SERVAL_PREINITIALIZED_DATA
this macro is optional, but must be at least implemented as returning the value false (0) it optimizes the initialization handling of the stack it shall return true (!=0) if the boot loader supports the copy of preinitialized data into stack. And false (0) if not.


All rights reserved. The use is subject to the XDK SDK EULA by Bosch Connected Devices and Solutions GmbH.
This documentation file has been automatically generated on Thu Mar 14 2019 19:12:47 by doxygen 1.8.8