Why this code in tcptrace

From: Lu Guohan (lguohan00@mails.tsinghua.edu.cn)
Date: 05/02/02


Message-ID: <001b01c1f1b4$1b55a710$528019d2@garfield>
From: "Lu Guohan" <lguohan00@mails.tsinghua.edu.cn>
Subject: Why this code in tcptrace
Date: Thu, 2 May 2002 16:33:59 +0800

Hi,
    I'm not sure I post this in the right place. Below is the code in function ProcessFile(). I don't understand this code and the notes. Any one can help to explain this? Why the system call overhead will kill us?

 /* for efficiency, only allow a signal every 1000 packets */
 /* (otherwise the system call overhead will kill us) */
 if (pnum % 1000 == 0) {
     sigset_t mask;

     sigemptyset(&mask);
     sigaddset(&mask,SIGINT);

     sigprocmask(SIG_UNBLOCK, &mask, NULL);
     /* signal can happen EXACTLY HERE, when data structures are consistant */
     sigprocmask(SIG_BLOCK, &mask, NULL);
 }

Thanks

Lu Guohan
----------------------------------------------------------------------------
To unsubscribe, send a message with body containing "unsubscribe tcptrace" to
majordomo@tcptrace.org.



This archive was generated by hypermail 2b30 : 05/02/02 EDT