Changeset 160 for soft/giet_vm/libs


Ignore:
Timestamp:
Jun 12, 2012, 4:21:27 PM (12 years ago)
Author:
karaoui
Message:

giet-vm new version

Location:
soft/giet_vm/libs
Files:
19 added
3 edited

Legend:

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

    r159 r160  
    55// Copyright (c) UPMC-LIP6
    66///////////////////////////////////////////////////////////////////////////////////
    7 // The barrier.c and barrier.h files are part of the GIET nano-kernel.
     7// These barrier.c and barrier.h files are part of the GIET nano-kernel.
    88// This user-level library provides a synchronisation service between several
    99// tasks sharing the same address space in a parallel multi-tasks application.
    10 //
    11 // The barrier_init(), and the barrier_wait() functions do not require a syscall.
    12 // The barrier itself must have been allocated in a non cacheable segment,
    13 // if the platform does not provide hardwate cache coherence.
    14 //
    15 // ALL barriers must be defined in the mapping_info data structure,
    16 // to be initialised by the GIET in the boot phase.
    17 // The vobj_get_vbase() system call (defined in stdio.c and stdio.h files)
    18 // can be used to get the virtual base address of the barrier from it's name.
     10// Neither the barrier_init(), nor the barrier_wait() function require a syscall.
     11// The barrier itself must have been allocated in a shared data segment.
    1912///////////////////////////////////////////////////////////////////////////////////
    20 
    21 #include <barrier.h>
    2213
    2314///////////////////////////////////////////////////////////////////////////////////
  • soft/giet_vm/libs/stdio.c

    r158 r160  
    3434#define SYSCALL_IOC_READ        0x16
    3535#define SYSCALL_IOC_COMPLETED   0x17
    36 #define SYSCALL_MWMR_BASE       0x1A
     36#define SYSCALL_VOBJ_GET_VBASE  0x1A
    3737
    3838//////////////////////////////////////////////////////////////////////////////////
     
    720720//////////////////////////////////////////////////////////////////////////////////
    721721//      mwmr_base()
     722//      TODO!
    722723// This function returns in argument buffer the virtual base address
    723724// of a MWMR communication channel, identified by the two arguments
     
    726727// must be declared in the mapping_info data structure to be initialised
    727728// in the boot phase.
    728 // - Returns 0 if success, > 0 if error ( channel not defined )
    729 //////////////////////////////////////////////////////////////////////////////////
    730 unsigned int mwmr_base( char*           vspace_name,
    731                         char*           mwmr_name,
    732                         void*           buffer )
    733 {
    734     return sys_call(SYSCALL_MWMR_BASE,
     729// - Returns the address if success,  0 if error ( channel not defined )
     730//////////////////////////////////////////////////////////////////////////////////
     731unsigned int vobj_get_vbase( char* vspace_name, char* vobj_name,
     732                        unsigned int vobj_type, unsigned int* vobj_buffer)
     733{
     734    return sys_call(SYSCALL_VOBJ_GET_VBASE,
    735735                    (unsigned int)vspace_name,
    736                     (unsigned int)mwmr_name,
    737                     (unsigned int)buffer,
    738                     0);
     736                    (unsigned int)vobj_name,
     737                    (unsigned int)vobj_type,
     738                    (unsigned int)vobj_buffer);
    739739}
    740740////////////////////////////////////////////////////////////////////////////////////
  • soft/giet_vm/libs/stdio.h

    r158 r160  
    88#ifndef _STDIO_H
    99#define _STDIO_H
     10
     11#include <mapping_info.h>
    1012
    1113/* MIPS32 related functions */
     
    5759unsigned int rand();
    5860unsigned int ctx_switch();
    59 unsigned int mwmr_base(char* vspace_name, char* mwmr_name, void* buffer);
     61unsigned int vobj_get_vbase( char* vspace_name, char* vobj_name,
     62                        unsigned int vobj_type, unsigned int* vobj_buffer);
    6063
    6164/*
Note: See TracChangeset for help on using the changeset viewer.