[sdig-devel] sdig/src output.c,1.1,1.2
Status: Beta
Brought to you by:
raj2
From: Russell J. <ra...@us...> - 2006-05-22 01:42:55
|
Update of /cvsroot/sdig/sdig/src In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv26765 Modified Files: output.c Log Message: Add semaphore clean up function Index: output.c =================================================================== RCS file: /cvsroot/sdig/sdig/src/output.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** output.c 18 May 2006 18:31:09 -0000 1.1 --- output.c 22 May 2006 01:42:51 -0000 1.2 *************** *** 16,23 **** enum ops { UNLOCK = 1, LOCK = -1 }; - int lock = 0; ! void output_sem_init() { int ret; --- 16,26 ---- enum ops { UNLOCK = 1, LOCK = -1 }; int lock = 0; ! /* ! * initialize output locking semaphore ! */ ! void ! output_sem_init() { int ret; *************** *** 52,56 **** } ! void output_sem_cleanup() { int ret; --- 55,63 ---- } ! /* ! * deallocate lock semaphore ! */ ! void ! output_sem_cleanup() { int ret; *************** *** 64,68 **** } ! void output_lock(enum ops op) { struct sembuf buf = { 0, 0, SEM_UNDO }; --- 71,79 ---- } ! /* ! * toggle output lock ! */ ! void ! output_lock(enum ops op) { struct sembuf buf = { 0, 0, SEM_UNDO }; *************** *** 78,82 **** } ! /* make the octet string into something nicer for humans */ void printmac(unsigned const char *mac) --- 89,95 ---- } ! /* ! * make the octet string into something nicer for humans ! */ void printmac(unsigned const char *mac) *************** *** 129,132 **** output_lock(UNLOCK); } - - --- 142,143 ---- |