Re: clock.h

From: Dan Nelson (dnelson_at_allantgroup.com)
Date: 02/28/05

  • Next message: Kathy Quinlan: "Re: clock.h"
    Date: Mon, 28 Feb 2005 10:08:03 -0600
    To: Kathy Quinlan <kat-free@kaqelectronics.dyndns.org>
    
    

    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.

    -- 
    	Dan Nelson
    	dnelson@allantgroup.com
    _______________________________________________
    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: Kathy Quinlan: "Re: clock.h"