Changeset 160 for soft/giet_vm/libs
- Timestamp:
- Jun 12, 2012, 4:21:27 PM (13 years ago)
- Location:
- soft/giet_vm/libs
- Files:
-
- 19 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/libs/barrier.c
r159 r160 5 5 // Copyright (c) UPMC-LIP6 6 6 /////////////////////////////////////////////////////////////////////////////////// 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. 8 8 // This user-level library provides a synchronisation service between several 9 9 // 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. 19 12 /////////////////////////////////////////////////////////////////////////////////// 20 21 #include <barrier.h>22 13 23 14 /////////////////////////////////////////////////////////////////////////////////// -
soft/giet_vm/libs/stdio.c
r158 r160 34 34 #define SYSCALL_IOC_READ 0x16 35 35 #define SYSCALL_IOC_COMPLETED 0x17 36 #define SYSCALL_ MWMR_BASE 0x1A36 #define SYSCALL_VOBJ_GET_VBASE 0x1A 37 37 38 38 ////////////////////////////////////////////////////////////////////////////////// … … 720 720 ////////////////////////////////////////////////////////////////////////////////// 721 721 // mwmr_base() 722 // TODO! 722 723 // This function returns in argument buffer the virtual base address 723 724 // of a MWMR communication channel, identified by the two arguments … … 726 727 // must be declared in the mapping_info data structure to be initialised 727 728 // 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 ////////////////////////////////////////////////////////////////////////////////// 731 unsigned 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, 735 735 (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); 739 739 } 740 740 //////////////////////////////////////////////////////////////////////////////////// -
soft/giet_vm/libs/stdio.h
r158 r160 8 8 #ifndef _STDIO_H 9 9 #define _STDIO_H 10 11 #include <mapping_info.h> 10 12 11 13 /* MIPS32 related functions */ … … 57 59 unsigned int rand(); 58 60 unsigned int ctx_switch(); 59 unsigned int mwmr_base(char* vspace_name, char* mwmr_name, void* buffer); 61 unsigned int vobj_get_vbase( char* vspace_name, char* vobj_name, 62 unsigned int vobj_type, unsigned int* vobj_buffer); 60 63 61 64 /*
Note: See TracChangeset
for help on using the changeset viewer.