~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/thr_alarm.h

  • Committer: Brian Aker
  • Date: 2009-02-05 10:38:55 UTC
  • Revision ID: brian@tangent.org-20090205103855-wajzccrbu7zbvmh4
Reworked some classes out of session.h
Also updated ignore file.

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
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;
78
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
void 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
89
void init_thr_alarm(uint32_t max_alarm);
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
 
RETSIGTYPE process_alarm(int);
 
95
void process_alarm(int);
90
96
#ifndef thr_got_alarm
91
97
bool thr_got_alarm(thr_alarm_t *alrm);
92
98
#endif