POK(kernelpart)
time.c
Go to the documentation of this file.
1 /*
2  * POK header
3  *
4  * The following file is a part of the POK project. Any modification should
5  * made according to the POK licence. You CANNOT use this file or a part of
6  * this file is this part of a file for your own project
7  *
8  * For more information on the POK licence, please see our LICENCE FILE
9  *
10  * Please follow the coding guidelines described in doc/CODING_GUIDELINES
11  *
12  * Copyright (c) 2007-2009 POK team
13  *
14  * Created by julien on Thu Jan 15 23:34:13 2009
15  */
16 
24 #if defined (POK_NEEDS_TIME) || defined (POK_NEEDS_SCHED) || defined (POK_NEEDS_THREADS)
25 
26 #include <bsp.h>
27 #include <types.h>
28 #include <errno.h>
29 
30 #include <core/time.h>
31 #include <core/thread.h>
32 #include <core/sched.h>
33 #include <core/partition.h>
34 
39 uint64_t pok_tick_counter = 0;
40 
47 void pok_time_init (void)
48 {
49  pok_tick_counter = 0;
51 }
52 
53 
54 #ifdef POK_NEEDS_GETTICK
55 
61 pok_ret_t pok_gettick_by_pointer (uint64_t* clk_val)
62 {
63  *clk_val = pok_tick_counter;
64  return POK_ERRNO_OK;
65 }
66 #endif
67 
68 #endif /* POK_NEEDS_... */