~ms-fk/embedded-pbxt/trunk

« back to all changes in this revision

Viewing changes to src/stubs_xt_emb.h

  • Committer: Martin Scholl
  • Date: 2010-02-09 22:37:48 UTC
  • Revision ID: ms@blaise-20100209223748-x2yjwk6yjlgkn7md
only 2 missing definitions remain for goal 1

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
#ifndef __emb_xt_stubs__
4
4
#define __emb_xt_stubs__
5
5
 
 
6
#include <pthread.h>
 
7
 
6
8
#if !defined(HAVE_UINT)
7
9
#undef HAVE_UINT
8
10
#define HAVE_UINT
28
30
#endif
29
31
} MY_BITMAP;
30
32
 
 
33
 
 
34
/// from mysql's my_list.h
 
35
typedef struct st_list {
 
36
  struct st_list *prev,*next;
 
37
  void *data;
 
38
} LIST;
 
39
 
 
40
 
 
41
struct THR_LOCK_DATA;
 
42
 
 
43
//from mysql's thr_lock.h
 
44
struct st_lock_list {
 
45
  THR_LOCK_DATA *data,**last;
 
46
};
 
47
 
 
48
typedef struct st_thr_lock {
 
49
  LIST list;
 
50
  pthread_mutex_t mutex;
 
51
  struct st_lock_list read_wait;
 
52
  struct st_lock_list read;
 
53
  struct st_lock_list write_wait;
 
54
  struct st_lock_list write;
 
55
  /* write_lock_count is incremented for write locks and reset on read locks */
 
56
  ulong write_lock_count;
 
57
  uint read_no_write_count;
 
58
  void (*get_status)(void*, int);       /* When one gets a lock */
 
59
  void (*copy_status)(void*,void*);
 
60
  void (*update_status)(void*);         /* Before release of write */
 
61
  void (*restore_status)(void*);         /* Before release of read */
 
62
  my_bool (*check_status)(void *);
 
63
} THR_LOCK;
 
64
 
 
65
 
31
66
extern "C" void create_last_word_mask(MY_BITMAP *map);
32
67
 
 
68
 
33
69
#endif
34
70
 
35
71
#endif