From owner-freebsd-hackers Mon Jun 29 13:30:48 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA02627 for freebsd-hackers-outgoing; Mon, 29 Jun 1998 13:30:48 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from tarsier.ca.sandia.gov (tarsier.ca.sandia.gov [146.246.246.124]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA02495 for ; Mon, 29 Jun 1998 13:30:04 -0700 (PDT) (envelope-from cc@tarsier.ca.sandia.gov) Received: from tarsier.ca.sandia.gov (localhost [127.0.0.1]) by tarsier.ca.sandia.gov (8.8.8/8.8.8) with ESMTP id NAA07249; Mon, 29 Jun 1998 13:28:16 -0700 (PDT) (envelope-from cc@tarsier.ca.sandia.gov) Message-Id: <199806292028.NAA07249@tarsier.ca.sandia.gov> X-Mailer: exmh version 2.0.2 2/24/98 To: zhihuizhang cc: hackers Subject: Re: Interrupt Handling and inline assembly In-reply-to: Your message of "Mon, 29 Jun 1998 14:42:25 EDT." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 29 Jun 1998 13:28:16 -0700 From: "Chris Csanady" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > >I got two questions: > >(1) I read in the MailingList Archive that the interrupt blocking in >FreeBSD is software-based, we do not communicate with 8259 (which I think >is slower) What is the advantage of doing this besides being faster? If >we mask interrupts off (by cli or setting the IMR register in 8259), will >interrupts be simply discarded (the device has to request interrupt >again) or postponed by 8259? > >(2) I am reading the source code in cpufunc.h: > > static __inline void > setbits(volatile unsigned * addr, u_int bits) > { > __asm __volatile("orl %1, %0" : "=m" (*addr): "ir"(bits)); > } > >I have read a text on inline assembly at: > > http://www.rt66.com/~brennan/djgpp/djgpp_asm.html > >But I still do not understand the meaining of "m" and "ir". Take a look at at the gcc info files. These are register constraints, and are described in detail in gcc / C Extensions / Extended Asm. Chris To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message