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 #if defined(RDM_64BIT)
38 #define RDM_64BIT_CODE RDM_T("l")
39 #define RDM_64BIT_CODE_A "l"
40 #else
41 #define RDM_64BIT_CODE RDM_T("ll")
42 #define RDM_64BIT_CODE_A "ll"
43 #endif
44 
45 #if defined(RDM_32BIT)
46  #define PSP_ARG_T int32_t
47 #else
48  #define PSP_ARG_T int64_t
49 #endif
50 
51 int32_t parse_vxworks_startup(int32_t (*)(int32_t, const char *const *),
52  const char *, const char *, const char *, const char *, const char *,
53  const char *, const char *, const char *, const char *, const char *,
54  const char *);
55 
56 #define RDM_STARTUP_EXAMPLE(name) \
57  int32_t name##_main(int32_t argc, const char *const *argv); \
58  int32_t name( \
59  PSP_ARG_T a1, \
60  PSP_ARG_T a2, \
61  PSP_ARG_T a3, \
62  PSP_ARG_T a4, \
63  PSP_ARG_T a5, \
64  PSP_ARG_T a6, \
65  PSP_ARG_T a7, \
66  PSP_ARG_T a8, \
67  PSP_ARG_T a9, \
68  PSP_ARG_T a10) \
69  { \
70  return parse_vxworks_startup(name##_main, #name, (char *) a1, \
71  (char *) a2, (char *) a3, (char *) a4, (char *) a5, \
72  (char *) a6, (char *) a7, (char *) a8, (char *) a9, \
73  (char *) a10); \
74  }
75 #endif
76 #define RDM_STARTUP_TEST(name) RDM_STARTUP_EXAMPLE(name)
77 #endif