Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sun, 22 Dec 2002 00:24:10 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sun, 22 Dec 2002 00:24:10 -0500 Received: from smtp.comcast.net ([24.153.64.2]:1331 "EHLO smtp.comcast.net") by vger.kernel.org with ESMTP id ; Sun, 22 Dec 2002 00:24:09 -0500 Date: Sun, 22 Dec 2002 00:36:32 -0500 From: Joshua Stewart Subject: A little explanation needed To: linux-kernel@vger.kernel.org Message-id: <1040535392.1518.3.camel@localhost.localdomain> MIME-version: 1.0 X-Mailer: Ximian Evolution 1.0.8 (1.0.8-10) Content-type: text/plain Content-transfer-encoding: 7BIT Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 680 Lines: 23 Can anyone explain the purpose of this #define... #define __cpu_raise_softirq(cpu, nr) do { softirq_pending(cpu) |= 1UL << (nr); } while (0) // from interrupt.h ...versus the more "plain"... #define __cpu_raise_softirq(cpu,nr) softirq_pending(cpu |= 1UL << (nr). In otherwords, what's the use of a do{X}while(0) "loop" instead of just X. I'm not the world's best trained C programmer, so forgive me if I sound stupid. Josh - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/