summaryrefslogtreecommitdiffstats
path: root/hw4/chttpd/chttpd-server.h
diff options
context:
space:
mode:
authorLAN-TW <lantw44@gmail.com>2014-01-14 04:46:07 +0800
committerLAN-TW <lantw44@gmail.com>2014-01-14 04:48:21 +0800
commit549548a09953851531f5104c5f1334b0f036764d (patch)
treefa6267ff580bf716eeac52901ae1410a5482355b /hw4/chttpd/chttpd-server.h
parent5873050be326f8b645b994d8c5e8b266573a6e40 (diff)
downloadsp2013-549548a09953851531f5104c5f1334b0f036764d.tar
sp2013-549548a09953851531f5104c5f1334b0f036764d.tar.gz
sp2013-549548a09953851531f5104c5f1334b0f036764d.tar.bz2
sp2013-549548a09953851531f5104c5f1334b0f036764d.tar.lz
sp2013-549548a09953851531f5104c5f1334b0f036764d.tar.xz
sp2013-549548a09953851531f5104c5f1334b0f036764d.tar.zst
sp2013-549548a09953851531f5104c5f1334b0f036764d.zip
HW4: 接收通知、結束程式、處理 main thread 的 signal
Diffstat (limited to 'hw4/chttpd/chttpd-server.h')
-rw-r--r--hw4/chttpd/chttpd-server.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/hw4/chttpd/chttpd-server.h b/hw4/chttpd/chttpd-server.h
index 1fd6f7c..e85716b 100644
--- a/hw4/chttpd/chttpd-server.h
+++ b/hw4/chttpd/chttpd-server.h
@@ -12,16 +12,20 @@ typedef struct {
struct sockaddr_storage addr;
socklen_t addrlen;
int attr_admin : 1;
+ ChttpdLog* hlog;
/* read-write and lock */
pthread_rwlock_t lock;
- ChttpdLog* hlog;
LbsListMeta* conn;
int attr_close : 1;
} ChttpdServer;
-extern int chttpd_server_notify;
-extern pthread_mutex_t chttpd_server_notify_mutex;
+extern int chttpd_server_notify;
+extern pthread_mutex_t chttpd_server_notify_mutex;
+extern ChttpdServer chttpd_server_notify_data;
+
+extern unsigned long long chttpd_server_count;
+extern pthread_rwlock_t chttpd_server_count_lock;
void chttpd_server_ctor (void* server_generic, ChttpdLog* hlog, bool is_admin);
void chttpd_server_dtor (void* server_generic);