-
Notifications
You must be signed in to change notification settings - Fork 0
/
brwhelpers.h
51 lines (42 loc) · 1.28 KB
/
brwhelpers.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/******************************************************************
* ( $Id: brwhelpers.h,v 1.9 2003/04/02 18:12:47 brw Exp $ )
* brwhelpers.h
* Copyright 2002-2003 Branden R. Williams, Elliptix, LLC.
* Author: Branden R. Williams
* Details:
* Need to thread-enable the queue.
*
* $Log: brwhelpers.h,v $
* Revision 1.9 2003/04/02 18:12:47 brw
* fixed copyright and added log/id cvs tags
*
*
******************************************************************/
#ifndef BRWHELPERS_H
#define BRWHELPERS_H
#endif
#include <signal.h>
#include <string.h>
#include <unistd.h>
#ifndef MYPTHREADS_H
#include "mypthreads.h"
#endif
#ifndef LOG_H
#include "log.h"
#endif
#ifndef MAIN_H
#include "main.h"
#endif
#ifndef min
#define min(X, Y) ((X) < (Y) ? (X) : (Y))
#endif
/* splitIpAddress simply takes the 4 octets and breaks them up */
int splitIpAddress(char *ip_ptr, short *first, short *second, short *third, short *fourth);
/* I need to cleanly shut down so I trap SIGTERM */
void sigControl(int sig);
/* some helper functions that are called from main.c */
void populateEntries (int myJobNum, int myServerID);
void recoverFromCrash(void);
void checkForWork(void);
void checkForMessages(void);
void requeueKilledServerWork (int myServerID);