Changeset 759 for soft/giet_vm/giet_libs/stdio.c
- Timestamp:
- Jan 18, 2016, 4:57:13 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_libs/stdio.c
r749 r759 992 992 (unsigned int)buffer, 993 993 count, 994 0 ); // no physical addressing required 994 0 ); 995 } 996 997 /////////////////////////////////////// 998 int giet_fat_pread( unsigned int fd_id, 999 void* buffer, 1000 unsigned int count, 1001 unsigned int offset ) 1002 { 1003 return sys_call( SYSCALL_FAT_PREAD, 1004 fd_id, 1005 (unsigned int)buffer, 1006 count, 1007 offset ); 995 1008 } 996 1009 … … 1004 1017 (unsigned int)buffer, 1005 1018 count, 1006 0 ); // no physical addressing required1019 0 ); 1007 1020 } 1008 1021 … … 1083 1096 1084 1097 va_start( args, format ); 1098 1085 1099 count = xprintf( stream, 4096, format, &args ); 1086 1100 va_end( args ); 1087 1101 1088 if ( count == 0xFFFFFFFF ) giet_pthread_exit(" illegal formatin giet_fat_fprintf()");1102 if ( count == 0xFFFFFFFF ) giet_pthread_exit("error in giet_fat_fprintf()"); 1089 1103 1090 1104 return sys_call( SYSCALL_FAT_WRITE, … … 1093 1107 count, 1094 1108 0 ); // no physical addressing required 1109 } 1110 1111 ///////////////////////////////////////// 1112 void* giet_fat_mmap( void* vaddr, // MAP_FIXED not supported 1113 unsigned int length, 1114 unsigned int prot, 1115 unsigned int flags, 1116 unsigned int fd_id, 1117 unsigned int offset ) 1118 { 1119 if ( flags & MAP_FIXED ) giet_pthread_exit("error in giet_fat_mmap()"); 1120 if ( flags & MAP_PRIVATE ) giet_pthread_exit("error in giet_fat_mmap()"); 1121 if ( flags & MAP_ANONYMOUS ) giet_pthread_exit("error in giet_fat_mmap()"); 1122 if ( length & 0xFFF ) giet_pthread_exit("error in giet_fat_mmap()"); 1123 if ( offset & 0xFFF ) giet_pthread_exit("error in giet_fat_mmap()"); 1124 1125 return (void*)sys_call( SYSCALL_FAT_MMAP, 1126 fd_id, 1127 length>>12, 1128 offset>>12, 1129 prot ); 1095 1130 } 1096 1131
Note: See TracChangeset
for help on using the changeset viewer.