~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/thr_lock.h

  • Committer: Stewart Smith
  • Date: 2008-12-22 05:46:59 UTC
  • mto: This revision was merged to the branch mainline in revision 728.
  • Revision ID: stewart@flamingspork.com-20081222054659-q10pu3uepim0iuwn
put snowman test into main suite

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#endif
23
23
 
24
24
#include <mysys/my_pthread.h>
 
25
#include <mysys/my_list.h>
25
26
#include <mysys/definitions.h>
26
27
 
27
28
struct st_thr_lock;
67
68
  void *status_param;                   /* Param to status functions */
68
69
} THR_LOCK_DATA;
69
70
 
70
 
/* A helper type for transactional locking. */
71
 
struct st_table_lock_info
72
 
{
73
 
  enum thr_lock_type lock_type;
74
 
  int           lock_timeout;
75
 
  bool          lock_transactional;
76
 
};
77
 
 
78
71
struct st_lock_list {
79
72
  THR_LOCK_DATA *data,**last;
80
73
};
81
74
 
82
75
typedef struct st_thr_lock {
 
76
  LIST list;
83
77
  pthread_mutex_t mutex;
84
78
  struct st_lock_list read_wait;
85
79
  struct st_lock_list read;
96
90
} THR_LOCK;
97
91
 
98
92
 
 
93
extern LIST *thr_lock_thread_list;
 
94
 
99
95
bool init_thr_lock(void);               /* Must be called once/thread */
100
96
#define thr_lock_owner_init(owner, info_arg) (owner)->info= (info_arg)
101
97
void thr_lock_info_init(THR_LOCK_INFO *info);