From owner-freebsd-questions Mon May 28 10:12: 4 2001 Delivered-To: freebsd-questions@freebsd.org Received: from perec.uol.com.br (perec.uol.com.br [200.231.206.204]) by hub.freebsd.org (Postfix) with ESMTP id E8DB437B423 for ; Mon, 28 May 2001 10:11:55 -0700 (PDT) (envelope-from lioux@uol.com.br) Received: from ppp229-bsace7020.telebrasilia.net.br (ppp229-bsace7020.telebrasilia.net.br [200.181.48.229]) by perec.uol.com.br (8.9.1/8.9.1) with ESMTP id OAA03357 for ; Mon, 28 May 2001 14:13:09 -0300 (BRT) Received: (qmail 6369 invoked by uid 1001); 28 May 2001 17:12:07 -0000 From: "Mario Sergio Fujikawa Ferreira" Date: Mon, 28 May 2001 14:11:44 -0300 To: freebsd-questions@freebsd.org Subject: How to define "struct rq"? Message-ID: <20010528141144.A6291@Fedaykin.here> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, If wanted to define a struct rq variable, which headers should I include? I am writing a simple user land test program. I am talking about the struct rq used in /usr/src/sys/kern/kern_switch.c I am using something like this: #include #include struct rq queues[1]; void main(void) { TAILQ_INIT(&queues[0]); } But when I try 'gcc test.c', I get test.c: In function `main': test.c:7: invalid use of undefined type `struct rq' test.c:7: invalid use of undefined type `struct rq' test.c:7: invalid use of undefined type `struct rq' test.c:6: warning: return type of `main' is not `int' test.c: At top level: test.c:4: storage size of `queues' isn't known What I am doing wrong? Where do I find the definition of struct rq? I've looked everywhere and sys/proc.h only tells it is extern. Regards, -- Mario S F Ferreira - UnB - Brazil - "I guess this is a signature." lioux at ( freebsd dot org | linf dot unb dot br ) flames to beloved devnull@someotherworldbeloworabove.org feature, n: a documented bug | bug, n: an undocumented feature To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message