~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_static.h

  • Committer: Brian Aker
  • Date: 2009-11-12 16:13:04 UTC
  • mfrom: (1211.1.7 staging)
  • Revision ID: brian@gaz-20091112161304-opamiauv36fg0n6u
Rollup of Brian, Padraig, and Stewart patches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
12
12
   You should have received a copy of the GNU General Public License
13
13
   along with this program; if not, write to the Free Software
14
 
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
 
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
15
 
16
16
/*
17
17
  Static variables for mysys library. All definied here for easy making of
18
18
  a shared library
19
19
*/
20
20
 
21
 
#ifndef DRIZZLED_INTERNAL_MY_STATIC_H
22
 
#define DRIZZLED_INTERNAL_MY_STATIC_H
 
21
#ifndef MYSYS_MY_STATIC_H
 
22
#define MYSYS_MY_STATIC_H
23
23
 
24
24
#include <signal.h>
25
25
 
28
28
#define MAX_KEYBLOCK    8192            /* Max keyblocklength == 8*IO_SIZE */
29
29
#define MAX_BLOCK_TYPES MAX_KEYBLOCK/MIN_KEYBLOCK
30
30
 
31
 
namespace drizzled
32
 
{
33
 
namespace internal
34
 
{
 
31
#ifdef __cplusplus
 
32
extern "C" {
 
33
#endif
 
34
 
 
35
struct st_remember {
 
36
  int number;
 
37
  void (*func)(int number);
 
38
};
35
39
 
36
40
/*
37
41
  Structure that stores information of a allocated memory block
41
45
  boundary.
42
46
*/
43
47
 
44
 
class irem
 
48
struct st_irem
45
49
{
46
 
public:
47
 
  irem *next;           /* Linked list of structures       */
48
 
  irem *prev;           /* Other link                      */
 
50
  struct st_irem *next;         /* Linked list of structures       */
 
51
  struct st_irem *prev;         /* Other link                      */
49
52
  char *filename;               /* File in which memory was new'ed */
50
53
  uint32_t linenum;             /* Line number in above file       */
51
54
  uint32_t datasize;            /* Size requested                  */
52
55
  uint32_t SpecialValue;                /* Underrun marker value           */
53
 
 
54
 
  irem():
55
 
    next(NULL),
56
 
        prev(NULL),
57
 
        filename(0),
58
 
        linenum(0),
59
 
        datasize(0),
60
 
        SpecialValue(0)
61
 
  {}
62
56
};
63
57
 
64
58
 
65
59
extern char curr_dir[FN_REFLEN], home_dir_buff[FN_REFLEN];
66
60
 
67
61
extern volatile int _my_signals;
 
62
extern struct st_remember _my_sig_remember[MAX_SIGNALS];
68
63
 
69
64
extern unsigned char    *sf_min_adress,*sf_max_adress;
70
65
extern uint     sf_malloc_count;
71
 
extern class irem *sf_malloc_root;
 
66
extern struct st_irem *sf_malloc_root;
72
67
 
73
68
extern uint64_t query_performance_frequency, query_performance_offset;
74
69
 
75
70
extern sigset_t my_signals;             /* signals blocked by mf_brkhant */
76
71
 
77
 
} /* namespace internal */
78
 
} /* namespace drizzled */
 
72
#ifdef __cplusplus
 
73
}
 
74
#endif
79
75
 
80
 
#endif /* DRIZZLED_INTERNAL_MY_STATIC_H */
 
76
#endif /* MYSYS_MY_STATIC_H */