~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/thr_alarm.h

enable remaining subselect tests, merge with latest from the trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
#ifndef _thr_alarm_h
19
19
#define _thr_alarm_h
 
20
 
 
21
#include <signal.h>
 
22
 
20
23
#ifdef  __cplusplus
21
24
extern "C" {
22
25
#endif
35
38
typedef struct st_alarm_info
36
39
{
37
40
  uint32_t next_alarm_time;
38
 
  uint active_alarms;
39
 
  uint max_used_alarms;
 
41
  uint32_t active_alarms;
 
42
  uint32_t max_used_alarms;
40
43
} ALARM_INFO;
41
44
 
42
45
void thr_alarm_info(ALARM_INFO *info);
68
71
typedef thr_alarm_entry* thr_alarm_t;
69
72
 
70
73
typedef struct st_alarm {
71
 
  uint32_t expire_time;
 
74
  time_t expire_time;
72
75
  thr_alarm_entry alarmed;              /* set when alarm is due */
73
76
  pthread_t thread;
74
77
  my_thread_id thread_id;
75
78
  bool malloced;
76
79
} ALARM;
77
80
 
78
 
extern uint thr_client_alarm;
 
81
extern uint32_t thr_client_alarm;
79
82
extern pthread_t alarm_thread;
80
83
 
 
84
int compare_uint32_t(void *unused, unsigned char *a_ptr,unsigned char* b_ptr);
 
85
RETSIGTYPE thread_alarm(int sig);
 
86
 
81
87
#define thr_alarm_init(A) (*(A))=0
82
88
#define thr_alarm_in_use(A) (*(A)!= 0)
83
 
void init_thr_alarm(uint max_alarm);
84
 
void resize_thr_alarm(uint max_alarms);
85
 
bool thr_alarm(thr_alarm_t *alarmed, uint sec, ALARM *buff);
 
89
void init_thr_alarm(uint32_t max_alarm);
 
90
void resize_thr_alarm(uint32_t max_alarms);
 
91
bool thr_alarm(thr_alarm_t *alarmed, uint32_t sec, ALARM *buff);
86
92
void thr_alarm_kill(my_thread_id thread_id);
87
93
void thr_end_alarm(thr_alarm_t *alarmed);
88
94
void end_thr_alarm(bool free_structures);
89
 
sig_handler process_alarm(int);
 
95
RETSIGTYPE process_alarm(int);
90
96
#ifndef thr_got_alarm
91
97
bool thr_got_alarm(thr_alarm_t *alrm);
92
98
#endif