LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Using /dev/rtc causes message "system delaying clock ticks?"
@ 2007-04-28 21:46 melinda develey
  0 siblings, 0 replies; only message in thread
From: melinda develey @ 2007-04-28 21:46 UTC (permalink / raw)
  To: linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 930 bytes --]

I'm using an MPC885 with the linux kernel rtc emulator driver. Because I need to wake a process every second, exactly synchronized with the rtc, I'm using the following code snippet:

____________________________________________
/* Turn on update interrupts (one per second) */
retval = ioctl(fd, RTC_UIE_ON, 0);
if (retval == -1) {
        perror("ioctl");
        exit(errno);
}

while (1)
{
        /* This read will block */
        retval = read(fd, &data, sizeof(unsigned long));
        if (retval == -1) {
                perror("read");
                exit(errno);
        }
       /* Do something exactly synchronized with RTC */
       /* ...... */
}

_________________________________________


>From time to time I receive the message on the subject. What's happening?


Bye,
Melinda.


       
---------------------------------
Ahhh...imagining that irresistible "new car" smell?
 Check outnew cars at Yahoo! Autos.

[-- Attachment #2: Type: text/html, Size: 1595 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-04-28 21:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-28 21:46 Using /dev/rtc causes message "system delaying clock ticks?" melinda develey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox