From: Jesper Juhl <juhl@eisenstein.dk>
To: npunmia@hss.hns.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: RTC !
Date: Fri, 20 Apr 2001 12:38:57 +0000 [thread overview]
Message-ID: <3AE02DE1.C8C05C6D@eisenstein.dk> (raw)
In-Reply-To: <65256A34.003CDC69.00@sandesh.hss.hns.com>
npunmia@hss.hns.com wrote:
> Hi,
>
> When i compiled the following program , (taken from
> /usr/src/linux/Documentation/rtc.txt )
>
> (See attached file: rtc2.c)
>
> it gave me the following error:
>
> [root@msatuts1 timer1]# gcc -s -Wall -Wstrict-prototypes rtc2.c -o rtc2
> In file included from rtc2.c:17:
> /usr/include/linux/mc146818rtc.h:29: parse error before `rtc_lock'
> /usr/include/linux/mc146818rtc.h:29: warning: data definition has no type or
> storage class
> rtc2.c:25: warning: return type of `main' is not `int'
> [root@msatuts1 timer1]#
>
> Is this a bug?Can anyone tell me how to remove this parse error ?
It works fine for me using a 2.2.16 kernel and egcs-2.91.66 (see below)...
bash-2.04$ gcc -s -Wall -Wstrict-prototypes rtc2.c -o rtc2
rtc2.c:24: warning: return type of `main' is not `int'
bash-2.04$ ./rtc2
RTC Driver Test Example.
Counting 5 update (1/sec) interrupts from reading /dev/rtc: 1 2 3 4 5
Again, from using select(2) on /dev/rtc: 1 2 3 4 5
Current RTC date/time is 20-4-2001, 12:34:01.
Alarm time now set to 12:34:06.
Waiting 5 seconds for alarm... okay. Alarm rang.
Periodic IRQ rate was 1024Hz.
Counting 20 interrupts at:
2Hz: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
4Hz: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
8Hz: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
16Hz: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
32Hz: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
64Hz: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
*** Test complete ***
Typing "cat /proc/interrupts" will show 131 more events on IRQ 8.
bash-2.04$
Regards,
Jesper Juhl
juhl@eisenstein.dk
next prev parent reply other threads:[~2001-04-20 11:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-04-20 11:18 RTC ! npunmia
2001-04-20 12:38 ` Jesper Juhl [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-04-21 10:49 npunmia
2001-04-12 13:05 RTC !! Remko van der Vossen
2001-04-12 12:33 Remko van der Vossen
2001-04-12 9:20 npunmia
2001-04-12 21:39 ` David Woodhouse
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3AE02DE1.C8C05C6D@eisenstein.dk \
--to=juhl@eisenstein.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=npunmia@hss.hns.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.