File: orc.c

package info (click to toggle)
orc 1:0.4.6-2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 3,856 kB
  • ctags: 2,889
  • sloc: ansic: 29,000; sh: 10,220; xml: 2,508; makefile: 196
file content (62 lines) | stat: -rw-r--r-- 1,070 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62

#include "config.h"

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

#include <orc/orcprogram.h>
#include <orc/orcdebug.h>

/**
 * SECTION:orc
 * @title: Orc
 * @short_description: Library Initialization
 */

void _orc_debug_init(void);
void _orc_once_init(void);
void _orc_compiler_init(void);

/**
 * orc_init:
 * 
 * This function initializes the Orc library, and
 * should be called before using any other Orc function.
 * Subsequent calls to this function have no effect.
 */
void
orc_init (void)
{
  static int _inited = 0;
  if (_inited) return;

  _inited = 1;

  ORC_ASSERT(sizeof(OrcExecutor) == sizeof(OrcExecutorAlt));

  _orc_debug_init();
  _orc_once_init();
  _orc_compiler_init();
  orc_opcode_init();
  orc_c_init();
#ifdef ENABLE_BACKEND_C64X
  orc_c64x_c_init();
#endif
#ifdef ENABLE_BACKEND_MMX
  orc_mmx_init();
#endif
#ifdef ENABLE_BACKEND_SSE
  orc_sse_init();
#endif
#ifdef ENABLE_BACKEND_ALTIVEC
  orc_powerpc_init();
#endif
#ifdef ENABLE_BACKEND_ARM
  orc_arm_init();
#endif
#ifdef ENABLE_BACKEND_NEON
  orc_neon_init();
#endif
}