Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Fri, 23 Aug 2002 08:03:07 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Fri, 23 Aug 2002 08:03:06 -0400 Received: from cttsv008.ctt.ne.jp ([210.166.4.137]:455 "EHLO cttsv008.ctt.ne.jp") by vger.kernel.org with ESMTP id ; Fri, 23 Aug 2002 08:03:06 -0400 Message-Id: <200208231207.VAA13142@cttsv008.ctt.ne.jp> Date: Fri, 23 Aug 2002 13:58:01 +0900 To: sanket rathi , linux-kernel@vger.kernel.org From: Kerenyi Gabor Subject: Re: interrupt handler Organization: Tateyama Hungary Ltd. X-Mailer: Opera 5.12 build 932 X-Priority: 3 (Normal) Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 882 Lines: 21 8/23/2002 8:58:20 PM, "sanket rathi" wrote: >hi, >Can i use spin lock in the interrupt handler for a singlre processor machine. because books says u can not use locks >but spin lock is some thing diffrent Yes you can. Spinlocks will be compiled in if you choose SMP even on single processor machine. But look at the documentation in the kernel source. I think "lock" in your message is a semaphore in real life. Spinlocks never sleep - they don't perform task switch and you can use them anywhere, while semaphores can sleep and you can use them only in user context (not in interrupt or bottom half) Gabor - 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/