Changeset 713 for soft/giet_vm/giet_libs/stdio.c
- Timestamp:
- Oct 7, 2015, 11:58:24 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_libs/stdio.c
r709 r713 111 111 } 112 112 113 ////////////////////////////////////////////// 114 int giet_pthread_pause( char* vspace_name, 115 char* thread_name )116 { 117 return sys_call( SYSCALL_PTHREAD_CONTROL, 118 THREAD_CMD_PAUSE,119 (unsigned int) vspace_name,120 (unsigned int) thread_name,121 0 );122 } 123 124 /////////////////////////////////////////////// 125 int giet_pthread_resume( char* vspace_name, 126 char* thread_name )127 { 128 return sys_call( SYSCALL_PTHREAD_CONTROL,129 THREAD_CMD_RESUME,130 (unsigned int) vspace_name,131 (unsigned int) thread_name,132 0);133 }134 135 /////////////////////////////////////////////// 136 int giet_pthread_context( char* vspace_name, 137 char* thread_name )138 { 139 return sys_call( SYSCALL_PTHREAD_CONTROL,140 THREAD_CMD_CONTEXT,141 (unsigned int) vspace_name,142 (unsigned int) thread_name,143 0 );113 //////////////////////////////////////////////// 114 void giet_pthread_control( unsigned int command, 115 char* vspace_name, 116 char* thread_name ) 117 { 118 int ret = sys_call( SYSCALL_PTHREAD_CONTROL, 119 command, 120 (unsigned int) vspace_name, 121 (unsigned int) thread_name, 122 0 ); 123 124 if ( ret == SYSCALL_VSPACE_NOT_FOUND ) 125 { 126 giet_tty_printf(" ERROR in PTHREAD_CONTROL : " 127 "vspace %s not found\n", vspace_name ); 128 } 129 if ( ret == SYSCALL_THREAD_NOT_FOUND ) 130 { 131 giet_tty_printf(" ERROR in PTHREAD_CONTROL : " 132 "thread %s not found\n", thread_name ); 133 } 134 if ( ret == SYSCALL_UNCOHERENT_THREAD_CONTEXT ) 135 { 136 giet_tty_printf(" ERROR in PTHREAD_CONTROL : " 137 "uncoherent context for thread %s\n", thread_name ); 138 } 139 if ( ret == SYSCALL_ILLEGAL_THREAD_COMMAND_TYPE ) 140 { 141 giet_tty_printf(" ERROR in PTHREAD_CONTROL : " 142 "illegal command type %d\n", command ); 143 } 144 144 } 145 145 … … 165 165 } 166 166 167 /////////////////////////////// 168 void giet_applications_status( )167 /////////////////////////////////////////// 168 void giet_applications_status( char* name ) 169 169 { 170 170 sys_call( SYSCALL_APPS_STATUS, 171 0, 0, 0, 0 ); 171 (unsigned int)name, 172 0, 0, 0 ); 172 173 } 173 174 … … 776 777 { 777 778 if ( sys_call( SYSCALL_TIM_ALLOC, 778 0, 0, 0, 0 ) ) giet_pthread_exit(" error in giet_timer_alloc()");779 0, 0, 0, 0 ) ) giet_pthread_exit("ERROR in TIMER_ALLOC"); 779 780 } 780 781 … … 784 785 if ( sys_call( SYSCALL_TIM_START, 785 786 period, 786 0, 0, 0 ) ) giet_pthread_exit(" error in giet_timer_start()");787 0, 0, 0 ) ) giet_pthread_exit("ERROR in TIMER_START"); 787 788 } 788 789 … … 791 792 { 792 793 if ( sys_call( SYSCALL_TIM_STOP, 793 0, 0, 0, 0 ) ) giet_pthread_exit(" error in giet_timer_stop()");794 0, 0, 0, 0 ) ) giet_pthread_exit("ERROR in TIMER_STOP"); 794 795 } 795 796 … … 799 800 ////////////////////////////////////////////////////////////////////////////////// 800 801 802 //////////////////////////////////////// 803 void giet_fbf_size( unsigned int* width, 804 unsigned int* height ) 805 { 806 sys_call( SYSCALL_FBF_SIZE, 807 (unsigned int)width, 808 (unsigned int)height, 809 0, 0 ); 810 } 811 812 ///////////////////// 813 void giet_fbf_alloc() 814 { 815 if ( sys_call( SYSCALL_FBF_ALLOC, 816 0, 0, 0, 0 ) ) giet_pthread_exit("ERROR in FBF_ALLOC"); 817 } 818 801 819 ///////////////////////// 802 820 void giet_fbf_cma_alloc() 803 821 { 804 822 if ( sys_call( SYSCALL_FBF_CMA_ALLOC, 805 0, 0, 0, 0 ) ) giet_pthread_exit(" error in giet_fbf_cma_alloc()");823 0, 0, 0, 0 ) ) giet_pthread_exit("ERROR in FBF_CMA_ALLOC"); 806 824 } 807 825 … … 816 834 (unsigned int)buf1_vbase, 817 835 (unsigned int)sts0_vaddr, 818 (unsigned int)sts1_vaddr ) ) giet_pthread_exit("error in giet_fbf_cma_init_buf()");836 (unsigned int)sts1_vaddr ) ) giet_pthread_exit("ERROR in FBF_CMA_INIT_BUF"); 819 837 } 820 838 … … 824 842 if ( sys_call( SYSCALL_FBF_CMA_START, 825 843 length, 826 0, 0, 0 ) ) giet_pthread_exit(" error in giet_fbf_cma_start()");844 0, 0, 0 ) ) giet_pthread_exit("ERROR in FBF_CMA_START"); 827 845 } 828 846 … … 832 850 if ( sys_call( SYSCALL_FBF_CMA_DISPLAY, 833 851 buffer, 834 0, 0, 0 ) ) giet_pthread_exit(" error in giet_fbf_cma_display()");852 0, 0, 0 ) ) giet_pthread_exit("ERROR in FBF_CMA_DISPLAY"); 835 853 } 836 854 … … 839 857 { 840 858 if ( sys_call( SYSCALL_FBF_CMA_STOP, 841 0, 0, 0, 0 ) ) giet_pthread_exit(" error in giet_fbf_cma_stop()");859 0, 0, 0, 0 ) ) giet_pthread_exit("ERROR in FBF_CMA_STOP"); 842 860 } 843 861 … … 851 869 (unsigned int)buffer, 852 870 length, 853 0 ) ) giet_pthread_exit(" error in giet_fbf_sync_write()");871 0 ) ) giet_pthread_exit("ERROR in FBF_SYNC_WRITE"); 854 872 } 855 873 … … 863 881 (unsigned int)buffer, 864 882 length, 865 0 ) ) giet_pthread_exit(" error in giet_fbf_sync_read()");883 0 ) ) giet_pthread_exit("ERROR in FBF_SYNC_READ"); 866 884 } 867 885
Note: See TracChangeset
for help on using the changeset viewer.