Products Support Documentation Download
psptypes-vxworks.h
Go to the documentation of this file.
1 /*
2  * Raima Database Manager
3  *
4  * Copyright (C) 2016 Raims Inc., All rights reserved.
5  *
6  * Use of this software, whether in source code format, or in executable,
7  * binary object code form, is governed by the Raima LICENSE which
8  * is fully described in the LICENSE.TXT file, included within this
9  * distribution of files.
10  */
11 
16 #ifndef RDM_DOXYGEN
17 #ifndef PSPTYPES_VXWORKS_H
18 #define PSPTYPES_VXWORKS_H
19 
20 #include <vxWorks.h>
21 
22 #if !defined(__INCstdinth)
23  #if defined(RDM_32BIT)
24  typedef int32_t intptr_t;
25  typedef uint32_t uintptr_t;
26  #else /* defined(RDM_64BIT) */
27  typedef int64_t intptr_t;
28  typedef uint64_t uintptr_t;
29  #endif
30 #endif
31 typedef int64_t intmax_t;
32 typedef uint64_t uintmax_t;
33 
34 #define RDM_NO_UNICODE
35 #define PUBLIC_CLASS
36 
37 #define RDM_ASSERT(x)
38 
39 #if defined(RDM_64BIT)
40 #define RDM_64BIT_CODE RDM_T("l")
41 #define RDM_64BIT_CODE_A "l"
42 #else
43 #define RDM_64BIT_CODE RDM_T("ll")
44 #define RDM_64BIT_CODE_A "ll"
45 #endif
46 
47 #if defined(RDM_32BIT)
48  #define PSP_ARG_T int32_t
49 #else
50  #define PSP_ARG_T int64_t
51 #endif
52 
53 int32_t parse_vxworks_startup(int32_t (*)(int32_t, const char *const *),
54  const char *, const char *, const char *, const char *, const char *,
55  const char *, const char *, const char *, const char *, const char *,
56  const char *);
57 
58 #define RDM_STARTUP_EXAMPLE(name) \
59  int32_t name##_main(int32_t argc, const char *const *argv); \
60  int32_t name( \
61  PSP_ARG_T a1, \
62  PSP_ARG_T a2, \
63  PSP_ARG_T a3, \
64  PSP_ARG_T a4, \
65  PSP_ARG_T a5, \
66  PSP_ARG_T a6, \
67  PSP_ARG_T a7, \
68  PSP_ARG_T a8, \
69  PSP_ARG_T a9, \
70  PSP_ARG_T a10) \
71  { \
72  return parse_vxworks_startup(name##_main, #name, (char *) a1, \
73  (char *) a2, (char *) a3, (char *) a4, (char *) a5, \
74  (char *) a6, (char *) a7, (char *) a8, (char *) a9, \
75  (char *) a10); \
76  }
77 #endif
78 #define RDM_STARTUP_TEST(name) RDM_STARTUP_EXAMPLE(name)
79 #endif