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
|
#ifndef _STATISTIC_H_
#define _STATISTIC_H_
#define STAT(X, OP) do { \
if(SHM && SHM->version==SHM_VERSION && 0<=(X) && (X)<STAT_MAX) \
SHM->statistic[X] OP; \
} while(0)
#define STATINC(X) STAT(X, ++)
enum { // XXX description in shmctl.c
STAT_LOGIN,
STAT_SHELLLOGIN,
STAT_VEDIT,
STAT_TALKREQUEST,
STAT_WRITEREQUEST,
STAT_MORE,
STAT_SYSWRITESOCKET,
STAT_SYSSELECT,
STAT_SYSREADSOCKET,
STAT_DOSEND,
STAT_SEARCHUSER,
STAT_THREAD,
STAT_SELECTREAD,
STAT_QUERY,
STAT_DOTALK,
STAT_FRIENDDESC,
STAT_FRIENDDESC_FILE,
STAT_PICKMYFRIEND,
STAT_PICKBFRIEND,
STAT_GAMBLE,
STAT_DOPOST,
STAT_READPOST,
STAT_RECOMMEND,
STAT_TODAYLOGIN_MIN,
STAT_TODAYLOGIN_MAX,
STAT_SIGINT,
STAT_SIGQUIT,
STAT_SIGILL,
STAT_SIGABRT,
STAT_SIGFPE,
STAT_SIGBUS,
STAT_SIGSEGV,
STAT_READPOST_12HR,
STAT_READPOST_1DAY,
STAT_READPOST_3DAY,
STAT_READPOST_7DAY,
STAT_READPOST_OLD,
/* insert here. don't forget update shmctl.c */
STAT_NUM,
STAT_MAX=512
};
#endif
|