Changeset 501 for soft/giet_vm/giet_libs
- Timestamp:
- Feb 8, 2015, 9:13:56 PM (10 years ago)
- Location:
- soft/giet_vm/giet_libs
- Files:
-
- 2 added
- 2 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_libs/stdio.c
r487 r501 253 253 { 254 254 va_list args; 255 const int channel = 0;256 255 volatile unsigned int sr_save; 257 256 258 257 sys_call( SYSCALL_TTY_GET_LOCK, 259 channel,258 0, 260 259 (unsigned int)&sr_save, 261 260 0, 0 ); 262 261 263 262 va_start( args, format ); 264 int ret = __printf(format, channel, &args);263 int ret = __printf(format, 0, &args); 265 264 va_end( args ); 266 265 267 266 sys_call( SYSCALL_TTY_RELEASE_LOCK, 268 channel,267 0, 269 268 (unsigned int)&sr_save, 270 269 0, 0 ); … … 541 540 ////////////////////////////////////////////////////////////////////////////////// 542 541 543 //////////////////////////////// 544 unsigned int giet_nic_rx_alloc() 542 //////////////////////////////////////////////////// 543 unsigned int giet_nic_rx_alloc( unsigned int xmax, 544 unsigned int ymax ) 545 545 { 546 546 int channel = sys_call( SYSCALL_NIC_ALLOC, 547 547 1, 548 0, 0, 0 ); 548 xmax, 549 ymax, 550 0 ); 549 551 if ( channel < 0 ) giet_exit("error in giet_nic_rx_alloc()"); 550 552 … … 552 554 } 553 555 554 //////////////////////////////// 555 unsigned int giet_nic_tx_alloc() 556 //////////////////////////////////////////////////// 557 unsigned int giet_nic_tx_alloc( unsigned int xmax, 558 unsigned int ymax ) 556 559 { 557 560 int channel = sys_call( SYSCALL_NIC_ALLOC, 558 0, 559 0, 0, 0 ); 561 0, 562 xmax, 563 ymax, 564 0 ); 560 565 if ( channel < 0 ) giet_exit("error in giet_nic_tx_alloc()"); 561 566 … … 772 777 } 773 778 774 /////////////////////////////////////////////// 775 void giet_proc_number( unsigned int cluster_id, 776 unsigned int* buffer ) 777 { 778 if ( sys_call( SYSCALL_PROC_NUMBER, 779 cluster_id, 780 (unsigned int) buffer, 781 0, 0) ) giet_exit("ERROR in giet_proc_number()"); 779 ///////////////////////////////////////////////// 780 void giet_procs_number( unsigned int* x_size, 781 unsigned int* y_size, 782 unsigned int* nprocs ) 783 { 784 if ( sys_call( SYSCALL_PROCS_NUMBER, 785 (unsigned int)x_size, 786 (unsigned int)y_size, 787 (unsigned int)nprocs, 788 0 ) ) giet_exit("ERROR in giet_procs_number()"); 782 789 } 783 790 -
soft/giet_vm/giet_libs/stdio.h
r487 r501 31 31 #define SYSCALL_FBF_CMA_STOP 0x0D 32 32 #define SYSCALL_EXIT 0x0E 33 #define SYSCALL_PROC _NUMBER0x0F33 #define SYSCALL_PROCS_NUMBER 0x0F 34 34 35 35 #define SYSCALL_FBF_SYNC_WRITE 0x10 … … 212 212 ////////////////////////////////////////////////////////////////////////// 213 213 214 extern unsigned int giet_nic_rx_alloc( );215 216 extern unsigned int giet_nic_tx_alloc( );214 extern unsigned int giet_nic_rx_alloc( unsigned int xmax, unsigned int ymax ); 215 216 extern unsigned int giet_nic_tx_alloc( unsigned int xmax, unsigned int ymax ); 217 217 218 218 extern void giet_nic_rx_start( unsigned int channel ); … … 272 272 extern void giet_context_switch(); 273 273 274 extern void giet_procnumber( unsigned int cluster_xy, 275 unsigned int buffer ); 274 extern void giet_procs_number( unsigned int* x_size, 275 unsigned int* y_size, 276 unsigned int* nprocs ); 276 277 277 278 extern void giet_vobj_get_vbase( char* vspace_name, -
soft/giet_vm/giet_libs/user_lock.c
r461 r501 78 78 void lock_release( user_lock_t* lock ) 79 79 { 80 unsigned int current = lock->current;80 asm volatile( "sync" ); 81 81 82 if ( current == (GIET_LOCK_MAX_TICKET - 1) ) lock->current = 0; 83 else lock->current = current + 1; 82 lock->current = lock->current + 1; 84 83 85 84 #if GIET_DEBUG_USER_LOCK
Note: See TracChangeset
for help on using the changeset viewer.