[Netadm-devel] gwc/include linklist.h,1.1.1.1,1.2 sysutil.h,1.3,1.4
Status: Beta
Brought to you by:
linuxpark
From: linuxpark <lin...@us...> - 2006-03-06 14:16:12
|
Update of /cvsroot/netadm/gwc/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12384/include Modified Files: linklist.h sysutil.h Log Message: ADD: Almost all is being finished in user layer for supporting more detailed pf rule. Except packet filter layer ("apply" function & ioctl & pf.c) FIX: policy cache concerned problem was fixed. ADD: cache lock FIX: socket error (it was stemed from wrong fd) Index: sysutil.h =================================================================== RCS file: /cvsroot/netadm/gwc/include/sysutil.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** sysutil.h 6 Mar 2006 04:23:56 -0000 1.3 --- sysutil.h 6 Mar 2006 14:16:05 -0000 1.4 *************** *** 36,40 **** #ifdef USE_SYSLOG #define out(fmt, args...) \ ! sysl_log(SYSLI, SYSL_PROC_INFO, "[%s,%s,%d]" fmt, __FILE__, __FUNCTION__, __LINE__, ##args) #else #define out(fmt, args...) \ --- 36,40 ---- #ifdef USE_SYSLOG #define out(fmt, args...) \ ! sysl_log(SYSLI, SYSL_PROC_INFO, fmt, ##args) #else #define out(fmt, args...) \ Index: linklist.h =================================================================== RCS file: /cvsroot/netadm/gwc/include/linklist.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** linklist.h 30 Jan 2006 17:41:29 -0000 1.1.1.1 --- linklist.h 6 Mar 2006 14:16:05 -0000 1.2 *************** *** 52,55 **** --- 52,56 ---- struct listnode *tail; unsigned int count; + int lock; int (*cmp) (void *val1, void *val2); void (*del) (void *val); *************** *** 62,65 **** --- 63,75 ---- #define getdata(X) ((X)->data) + static inline void LIST_LOCK (list lst) { + while (lst->lock); + lst->lock = 1; + } + + static inline void LIST_UNLOCK (list lst) { + lst->lock = 0; + } + /* Prototypes. */ struct list *list_new(); |