OpenCores
URL https://opencores.org/ocsvn/ao486/ao486/trunk

Subversion Repositories ao486

[/] [ao486/] [trunk/] [bochs486/] [extplugin.h] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 alfik
/////////////////////////////////////////////////////////////////////////
2
// $Id: extplugin.h 10966 2012-01-10 17:45:18Z vruppert $
3
/////////////////////////////////////////////////////////////////////////
4
//
5
// extplugin.h
6
//
7
// This header file defines the types necessary to make a Bochs plugin,
8
// but without mentioning all the details of Bochs internals (bochs.h).  
9
// It is included by the configuration interfaces and possibly other 
10
// things which are intentionally isolated from other parts of the program.
11
//
12
// The plugin_t struct comes from the plugin.h file from plex86.
13
// Plex86 is Copyright (C) 1999-2000  The plex86 developers team
14
//
15
/////////////////////////////////////////////////////////////////////////
16
 
17
#ifndef __EXTPLUGIN_H
18
#define __EXTPLUGIN_H
19
 
20
#if BX_PLUGINS
21
#if BX_HAVE_LTDL
22
#include <ltdl.h>
23
#elif !defined(_MSC_VER)
24
#include "ltdl.h"
25
#endif
26
#endif
27
 
28
enum plugintype_t {
29
  PLUGTYPE_NULL=100,
30
  PLUGTYPE_CORE,
31
  PLUGTYPE_STANDARD,
32
  PLUGTYPE_OPTIONAL,
33
  PLUGTYPE_USER
34
};
35
 
36
#define MAX_ARGC 10
37
 
38
typedef int (*plugin_init_t)(struct _plugin_t *plugin, plugintype_t type, int argc, char *argv[]);
39
typedef void (*plugin_fini_t)(void);
40
 
41
typedef struct _plugin_t
42
{
43
    plugintype_t type;
44
    int  initialized;
45
#if BX_PLUGINS
46
#if defined(_MSC_VER)
47
    HINSTANCE handle;
48
#else
49
    lt_dlhandle handle;
50
#endif
51
#endif
52
    int  argc;
53
    char *name, *args, *argv[MAX_ARGC];
54
    plugin_init_t plugin_init;
55
    plugin_fini_t plugin_fini;
56
 
57
    struct _plugin_t *next;
58
} plugin_t;
59
 
60
 
61
 
62
#endif /* __EXTPLUGIN_H */
63
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.