Ignore:
Timestamp:
Aug 13, 2012, 10:52:25 PM (12 years ago)
Author:
alain
Message:

Introducing support for XICU

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/libs/stdio.c

    r165 r203  
    55// Copyright (c) UPMC-LIP6
    66///////////////////////////////////////////////////////////////////////////////////
    7 // The stdio.c and stdio.h files are part of the GIET nano-kernel.
     7// The stdio.c and stdio.h files are part of the GIET_VM nano-kernel.
    88// This library contains all user-level functions that contain a system call
    99// to access protected or shared ressources.
     
    1717#define SYSCALL_TTY_WRITE       0x02
    1818#define SYSCALL_TTY_READ        0x03
     19#define SYSCALL_TIMER_START     0x04
     20#define SYSCALL_TIMER_STOP      0x05
    1921#define SYSCALL_GCD_WRITE       0x06
    2022#define SYSCALL_GCD_READ        0x07
     
    461463}
    462464
     465
     466/////  TIMER related system calls //////
     467
     468//////////////////////////////////////////////////////////////////////////////////
     469// giet_timer_start()
     470//////////////////////////////////////////////////////////////////////////////////
     471// This function activates the private user timer allocated to the calling task
     472// in the boot phase.
     473// - Returns 0 if success, > 0 if error.
     474//////////////////////////////////////////////////////////////////////////////////
     475unsigned int giet_timer_start()
     476{
     477    return sys_call(SYSCALL_TIMER_START,
     478                   0,0,0,0);
     479}
     480//////////////////////////////////////////////////////////////////////////////////
     481// giet_timer_stop()
     482//////////////////////////////////////////////////////////////////////////////////
     483// This function activates the user timer allocated to the calling task.
     484// - Returns 0 if success, > 0 if error.
     485//////////////////////////////////////////////////////////////////////////////////
     486unsigned int giet_timer_stop()
     487{
     488    return sys_call(SYSCALL_TIMER_STOP,
     489                   0,0,0,0);
     490}
     491
    463492/////  GCD (Greatest Common Divider) related system calls
    464493
Note: See TracChangeset for help on using the changeset viewer.