RTI Connext DDS Micro  Version 2.4.10
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
osapi_os_vxworks.h
Go to the documentation of this file.
1 /*
2  * FILE: osapi_os_vxworks.h - OS configuration file for VxWorks
3  *
4  * (c) Copyright, Real-Time Innovations, 2012-2016
5  *
6  * All rights reserved.
7  *
8  * No duplications, whole or partial, manual or electronic, may be made
9  * without express written permission. Any such copies, or
10  * revisions thereof, must display this notice unaltered.
11  * This code contains trade secrets of Real-Time Innovations, Inc.
12  *
13  * Modification History
14  * --------------------
15  * 25aug2016,eh Fixed MICRO-1559: VxWorks 64-Bit compatibility
16  * 28jul2016,tk Refactored from osapi_config.h
17  */
18 /*ce \file
19  * \brief OS API Configuration
20  */
21 #ifndef osapi_os_vxworks_h
22 #define osapi_os_vxworks_h
23 
24 #define OSAPI_INCLUDE_VXWORKS 1
25 
26 #ifndef RTI_VXWORKS
27 #define RTI_VXWORKS
28 #endif
29 
30 #include <unistd.h>
31 #include <stdio.h>
32 #include <stdlib.h>
33 #include <stdarg.h>
34 #include <errno.h>
35 #include <time.h>
36 #ifdef CERT
37 #ifndef RTI_CERT
38 #define RTI_CERT
39 #endif
40 #endif
41 #ifdef RTI_RTP
42 #include <strings.h>
43 #include <string.h>
44 #else
45 #include <string.h>
46 #endif
47 #include <vxWorks.h>
48 #ifdef RTI_RTP
49 #define USE_TIMER_THREAD_RT
50 #else
51 #define USE_WD_TIMER
52 #define USE_TIMER_THREAD_SEMAPHORE
53 #include <wdLib.h>
54 #include <logLib.h>
55 #endif
56 
57 #define HAVE_SOCKET_API
58 #define OSAPI_ENABLE_STDC_FREE 1
59 #define OSAPI_ENABLE_STDC_REALLOC 1
60 
61 
62 #define VXWORKS_VERSION_6_9_OR_BETTER \
63  ( ((VXWORKS_MAJOR_VERSION == 6) && (VXWORKS_MINOR_VERSION >= 9)) || \
64  (VXWORKS_MAJOR_VERSION > 6) \
65  )
66 
67 /* 64-Bit supported in VxWorks 6.9 and later */
68 #if VXWORKS_VERSION_6_9_OR_BETTER
69 #include <vsbConfig.h>
70 #endif
71 
72 
73 #define VXWORKS_VERSION_6_8_OR_BETTER \
74  ( ((VXWORKS_MAJOR_VERSION == 6) && (VXWORKS_MINOR_VERSION >= 8)) || \
75  (VXWORKS_MAJOR_VERSION > 6) \
76  )
77 
78 #define VXWORKS_VERSION_6_3_OR_BETTER \
79  ( ((VXWORKS_MAJOR_VERSION == 6) && (VXWORKS_MINOR_VERSION >= 3)) || \
80  (VXWORKS_MAJOR_VERSION > 6) \
81  )
82 
83 #define VXWORKS_VERSION_6_0_OR_BETTER \
84  ( ((VXWORKS_MAJOR_VERSION == 6) && (VXWORKS_MINOR_VERSION >= 0)) || \
85  (VXWORKS_MAJOR_VERSION > 6) \
86  )
87 
88 #define VXWORKS_VERSION_5_4_OR_BETTER \
89  ( ((VXWORKS_MAJOR_VERSION == 5) && (VXWORKS_MINOR_VERSION >= 4)) || \
90  (VXWORKS_MAJOR_VERSION > 5) \
91  )
92 
93 
94 #if VXWORKS_VERSION_6_9_OR_BETTER
95 #define OSAPI_ThreadHandle TASK_ID
96 #define OSAPI_UserArg _Vx_usr_arg_t
97 #define OSAPI_IoctlArg _Vx_ioctl_arg_t
98 #else
99 #define OSAPI_ThreadHandle int
100 #define OSAPI_UserArg int
101 #define OSAPI_IoctlArg int
102 #endif
103 
104 #if defined(RTI_RTP)
105 #define OSAPI_ProcessId pid_t
106 #define OSAPI_ThreadId pid_t
107 #else
108 #if VXWORKS_VERSION_6_9_OR_BETTER
109 #define OSAPI_ProcessId TASK_ID
110 #define OSAPI_ThreadId TASK_ID
111 #else
112 #define OSAPI_ProcessId int
113 #define OSAPI_ThreadId int
114 #endif /* VXWORKS_VERSION_6_9_OR_BETTER */
115 #endif /* defined(RTI_RTP)*/
116 
117 #ifndef OSAPI_LOG_WRITE_BUFFER
118 #define OSAPI_LOG_WRITE_BUFFER(buf_,len_) UNUSED_ARG(len_); if (printf("%s",buf_)){}
119 #endif
120 
121 #endif /* osapi_os_vxworks_h */

RTI Connext DDS Micro Version 2.4.10 Copyright © Fri Jun 30 2017 Real-Time Innovations, Inc