Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Oct 12 19:21:36 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id m9D2LaXB027312 for ; Sun, 12 Oct 2008 19:21:36 -0700 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.14.2/8.14.1) with ESMTP id m9D2Sv14021450 for ; Sun, 12 Oct 2008 19:28:57 -0700 Message-Id: <200810130228.m9D2Sv14021450@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: General Question Date: Sun, 12 Oct 2008 19:28:57 -0700 From: Bill Cheng Someone wrote: > While going through online forums I have often come > across the terms "thread safe" and "signal safe". > > Could you please explain what exactly do those > terms mean ? Thanks ! "Thread-safe" functions are functions where multiple threads can call this function simultaneously and it's no problem. If a function is not thread-safe, you should use a mutex and make sure that only one thread is allowed to call it at a time. I'm not familiar with the term "signal-safe". On wikipedia, it's defined as functinos that can be safely called from a signal handler. -- Bill Cheng // bill.cheng@usc.edu