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 #if defined(RDM_64BIT)
35 #define RDM_64BIT_CODE RDM_T ("l")
36 #define RDM_64BIT_CODE_A "l"
37 #else
38 #define RDM_64BIT_CODE RDM_T ("ll")
39 #define RDM_64BIT_CODE_A "ll"
40 #endif
41 
42 #define RDM_STARTUP_VXWORKS(name,main_entry) \
43  int32_t main_##name (int32_t argc, const char *const *argv); \
44  int32_t main_entry ( \
45  const char *a1, const char *a2, const char *a3, \
46  const char *a4, const char *a5, const char *a6, \
47  const char *a7, const char *a8, const char *a9, \
48  const char *a10) \
49  { \
50  int32_t status; \
51  int32_t argc = 0; \
52  const char * const argv[] = {#name, a1, a2, a3, a4, a5, \
53  a6, a7, a8, a9, a10, NULL}; \
54  while (argv[++argc]) \
55  { \
56  } \
57  RDM_STARTUP_HOOK \
58  status = psp_threadMain (main_##name, argc, argv); \
59  RDM_SHUTDOWN_HOOK \
60  return status; \
61  }
62 #define RDM_STARTUP_EXAMPLE(name) RDM_STARTUP_VXWORKS (name, name)
63 #define RDM_STARTUP_TEST(name) RDM_STARTUP_VXWORKS (name, test)
64 #endif
65 #endif