Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 May 2001 14:11:44 -0300
From:      "Mario Sergio Fujikawa Ferreira" <lioux@uol.com.br>
To:        freebsd-questions@freebsd.org
Subject:   How to define "struct rq"?
Message-ID:  <20010528141144.A6291@Fedaykin.here>

next in thread | raw e-mail | index | archive | help
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 <sys/param.h>
#include <sys/proc.h>

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010528141144.A6291>