|
RTI Connext DDS Micro C++ API
Version 2.4.12
|
Classes | |
| struct | OSAPI_ThreadInfo |
| Thread info. More... | |
Macros | |
| #define | OSAPI_THREAD_DEFAULT_OPTIONS 0x00 |
| #define | OSAPI_THREAD_FLOATING_POINT 0x01 |
| #define | OSAPI_THREAD_STDIO 0x02 |
| #define | OSAPI_THREAD_REALTIME_PRIORITY 0x08 |
| #define | OSAPI_THREAD_PRIORITY_ENFORCE 0x10 |
| #define | OSAPI_THREAD_CANCEL_ASYNCHRONOUS 0x20 |
| #define | OSAPI_THREAD_SUSPEND_ENABLE 0x40 |
| #define | OSAPI_THREAD_PROPERTY_DEFAULT |
Typedefs | |
| typedef RTI_UINT32 | OSAPI_ThreadOptions |
| typedef RTI_BOOL(* | OSAPI_ThreadRoutine )(struct OSAPI_ThreadInfo *thread_info) |
| Thread task signature. | |
Functions | |
| RTI_BOOL | OSAPI_Thread_wakeup (struct OSAPI_Thread *self) |
| Wakeup user-thread. | |
| RTI_BOOL | OSAPI_Thread_start (struct OSAPI_Thread *me) |
| Start a specific thread. | |
| RTI_BOOL | OSAPI_Thread_destroy (struct OSAPI_Thread *self) |
| Destroy a specific thread. | |
| void | OSAPI_Thread_sleep (RTI_UINT32 ms) |
| Suspend a thread for a specified amount of time. | |
| struct OSAPI_Thread * | OSAPI_Thread_create (const char *name, const struct OSAPI_ThreadProperty *properties, OSAPI_ThreadRoutine user_routine, void *user_data, OSAPI_ThreadRoutine wakeup_routine) |
| Create a thread. | |
| OSAPI_ThreadId | OSAPI_Thread_self (void) |
| Return thread ID. | |
| #define OSAPI_THREAD_DEFAULT_OPTIONS 0x00 |
Use only the default options the OS gives you.
| #define OSAPI_THREAD_FLOATING_POINT 0x01 |
Support floating point.
| #define OSAPI_THREAD_STDIO 0x02 |
Support standard I/O.
| #define OSAPI_THREAD_REALTIME_PRIORITY 0x08 |
Run in real-time priority mode.
| #define OSAPI_THREAD_PRIORITY_ENFORCE 0x10 |
Insist on the specified priority and fail if the OS doesn't like it.
| #define OSAPI_THREAD_CANCEL_ASYNCHRONOUS 0x20 |
Support the ability to asynchronously cancel the thread.
| #define OSAPI_THREAD_SUSPEND_ENABLE 0x40 |
Support the ability to suspend the thread. This is primarily for receive threads.
| #define OSAPI_THREAD_PROPERTY_DEFAULT |
Initializer for thread properties
| typedef RTI_UINT32 OSAPI_ThreadOptions |
Thread options
| typedef RTI_BOOL(* OSAPI_ThreadRoutine)(struct OSAPI_ThreadInfo *thread_info) |
Thread task signature.
| [in] | thread_info | Thread information structure |
| RTI_BOOL OSAPI_Thread_wakeup | ( | struct OSAPI_Thread * | self | ) |
Wakeup user-thread.
If a user-defined thread function is blocking, e.g. waiting for data, and the user wants to delete the thread, it is necessary to unblock the user-thread. The user must provide a function which can unblock a thread. This function calls the wake up function to wake up a blocked user thread.
| [in] | self | OSAPI_Thread to wakeup |
See Also OSAPI_Thread_start
| RTI_BOOL OSAPI_Thread_start | ( | struct OSAPI_Thread * | me | ) |
Start a specific thread.
| [in] | me | Thread to wake up |
See Also OSAPI_Thread_create
| RTI_BOOL OSAPI_Thread_destroy | ( | struct OSAPI_Thread * | self | ) |
Destroy a specific thread.
| [in] | self | Thread. |
See Also OSAPI_Thread_create
| void OSAPI_Thread_sleep | ( | RTI_UINT32 | ms | ) |
Suspend a thread for a specified amount of time.
| [in] | ms | Sleep time. |
|
read |
Create a thread.
| [in] | name | The name of the thread. |
| [in] | properties | Thread properties. These properties are hints. |
| [in] | user_routine | Thread task. The thread task cannot assume that it can block; thus it must be written such that it can be called repeatedly. |
| [in] | user_data | Parameters passed to the thread task. |
| [in] | wakeup_routine | Routine to wake up a thread, called to delete a thread. |
See Also OSAPI_Thread_destroy
| OSAPI_ThreadId OSAPI_Thread_self | ( | void | ) |