Added volatile keyword
This commit is contained in:
@@ -46,7 +46,7 @@ static int *pending;
|
||||
static Sitefile *site;
|
||||
static int mainfd; /* fd of the UNIX socket */
|
||||
static struct sockaddr_un addr;
|
||||
static ConnInfo *conninfo;
|
||||
static volatile ConnInfo *conninfo;
|
||||
/* We want to be able to handle a signal at any time, so some global variables
|
||||
* are needed. */
|
||||
static const int signals[] = {
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include <swebs/connections.h>
|
||||
|
||||
void runServer(int connfd, Sitefile *site, int *pending, int id,
|
||||
ConnInfo *conninfo) {
|
||||
volatile ConnInfo *conninfo) {
|
||||
int allocConns = 100;
|
||||
struct pollfd *fds;
|
||||
Connection *connections;
|
||||
|
||||
@@ -29,7 +29,7 @@ typedef struct {
|
||||
} ConnInfo;
|
||||
|
||||
void runServer(int connfd, Sitefile *site, int *pending, int id,
|
||||
ConnInfo *info);
|
||||
volatile ConnInfo *info);
|
||||
/* pending and info are shared memory. pending[id] is the amount of connections
|
||||
* that are being processed by that process, and info contains info about the
|
||||
* connection being sent through. */
|
||||
|
||||
Reference in New Issue
Block a user