Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 01 Mar 2005 00:11:26 +0800
From:      Kathy Quinlan <kat-free@kaqelectronics.dyndns.org>
To:        Dan Nelson <dnelson@allantgroup.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: clock.h
Message-ID:  <422342AE.9040207@kaqelectronics.dyndns.org>
In-Reply-To: <20050228160802.GG8778@dan.emsphone.com>
References:  <42233B48.4010108@kaqelectronics.dyndns.org> <20050228160802.GG8778@dan.emsphone.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Dan Nelson wrote:

> In the last episode (Feb 28), Kathy Quinlan said:
> 
>>I have this:
>>
>>#include <machine/clock.h>
>>
>>In program I use this:
>>
>>DELAY(1000);
>>
>>I get this:
>>
>>undefined referance to 'DELAY'
>>
>>when I compile the program with GCC with flags -Wall -g -o com main.c
> 
> 
> DELAY is a kernel function.  In user processes, just use sleep() or
> nanosleep().  When you directly #include <machine/*> headers from
> userland, the only useable things are structure definitions and macro
> constants (and even then it's recommended that you use a userland
> interface instead).  You can't call any of the functions.
> 
Thanks, using sleep now, only need a second :)

Slowly learning programming in a real enviroment whene we do not have 
microsloth program to hold our hands (never had a VC++ ap able to do 
anything to a system, this program has already core dumped a few times)

Regards,

Kat.


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 266.5.1 - Release Date: 27/02/2005



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