this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

LKM: implement clock_get_time()

+14 -4
+3 -1
src/lkm/mig_includes_pre.h
··· 25 25 #undef NSEC_PER_MSEC 26 26 #undef NSEC_PER_SEC 27 27 #undef USEC_PER_SEC 28 - #define __unused 28 + #ifndef __unused 29 + # define __unused 30 + #endif 29 31 #define weak_import weak 30 32 31 33 #endif
+11 -3
src/lkm/servers/clock.c
··· 17 17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 18 */ 19 19 20 + #include "../mig_includes_pre.h" 21 + #include <mach/mach_types.h> 20 22 #include "../mach_includes.h" 21 - #include "../mig_includes_pre.h" 23 + #include <linux/sched.h> 22 24 //#include "../mig/clockServer.h" 23 25 #include "../ipc_port.h" 24 - #include <mach/mach_types.h> 25 26 #include "clock.h" 26 27 27 28 kern_return_t clock_get_time ··· 30 31 mach_timespec_t *cur_time 31 32 ) 32 33 { 33 - return KERN_NOT_SUPPORTED; 34 + u64 tm; 35 + 36 + tm = get_jiffies_64(); 37 + 38 + cur_time->tv_sec = tm / HZ; 39 + cur_time->tv_nsec = (tm % HZ) * (NSEC_PER_SEC / HZ); 40 + 41 + return KERN_SUCCESS; 34 42 } 35 43 36 44 kern_return_t clock_get_attributes