Ignore:
Timestamp:
Nov 7, 2017, 3:08:12 PM (7 years ago)
Author:
alain
Message:

First implementation of fork/exec.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/kernel/syscalls/sys_get_cycle.c

    r405 r407  
    11/*
    2  * sys_clock: get calling core cycles count
     2 * sys_get_cycle.c - get calling core cycles count.
    33 *
    44 * Author    Alain Greiner (2016,2017)
     
    3232#include <printk.h>
    3333
    34 //////////////////////////////////
    35 int sys_clock (uint64_t * cycles )
     34//////////////////////////////////////
     35int sys_get_cycle ( uint64_t * cycle )
    3636{
    3737        error_t   error;
    3838    paddr_t   paddr;
    39         uint64_t  k_cycles;
     39        uint64_t  k_cycle;
    4040
    4141    thread_t  * this    = CURRENT_THREAD;
     
    4343
    4444    // check buffer in user space
    45     error = vmm_v2p_translate( false , cycles , &paddr );
     45    error = vmm_v2p_translate( false , cycle , &paddr );
    4646
    4747        if( error )
     
    5454
    5555    // call relevant core function
    56         k_cycles = hal_get_cycles();
     56        k_cycle = hal_get_cycles();
    5757
    5858    // copy to user space
    59         hal_copy_to_uspace( cycles , &k_cycles , sizeof(uint64_t) );
     59        hal_copy_to_uspace( cycle , &k_cycle , sizeof(uint64_t) );
    6060
    6161        return 0;
    6262
    63 }  // end sys_clock()
     63}  // end sys_get_cycle()
Note: See TracChangeset for help on using the changeset viewer.