~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/thr_alarm.h

  • Committer: Monty Taylor
  • Date: 2008-08-16 21:06:22 UTC
  • Revision ID: monty@inaugust.com-20080816210622-zpnn13unyinqzn72
Updated po files.

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