POK(kernelpart)
/home/jaouen/pok_official/pok/trunk/kernel/arch/ppc/timer.c File Reference
#include <errno.h>
#include <bsp.h>
#include <core/time.h>
#include <core/sched.h>

Go to the source code of this file.

Defines

#define BUS_FREQ   (100 * 1000000U)
#define FREQ_DIV   40

Functions

void pok_arch_decr_int (void)
pok_ret_t pok_bsp_time_init ()

Define Documentation

#define BUS_FREQ   (100 * 1000000U)

Definition at line 24 of file timer.c.

#define FREQ_DIV   40

Definition at line 26 of file timer.c.


Function Documentation

void pok_arch_decr_int ( void  )

Definition at line 73 of file timer.c.

{
  int err;

  do
  {
    err = pok_arch_set_decr();

    pok_tick_counter += FREQ_DIV;
  } while (err != POK_ERRNO_OK);

  pok_sched ();
}

Definition at line 87 of file timer.c.

{
  time_inter = (BUS_FREQ * FREQ_DIV) / POK_TIMER_FREQUENCY;
  time_last = get_ppc_tb ();
  pok_arch_set_decr();

  return (POK_ERRNO_OK);
}