Re: clock.h

From: Kathy Quinlan (kat-free_at_kaqelectronics.dyndns.org)
Date: 02/28/05

  • Next message: M. Warner Losh: "Re: clock.h"
    Date: Tue, 01 Mar 2005 00:11:26 +0800
    To: Dan Nelson <dnelson@allantgroup.com>
    
    

    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
    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
    

  • Next message: M. Warner Losh: "Re: clock.h"