Changeset 387 for asp3_tinet_ecnl_arm/trunk/asp3_dcre/mbed/mbed_stub.c
- Timestamp:
- May 22, 2019, 4:09:18 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
asp3_tinet_ecnl_arm/trunk/asp3_dcre/mbed/mbed_stub.c
r377 r387 66 66 #include "t_syslog.h" 67 67 68 extern void musl_start(const char *const args); 69 68 70 int main() 69 71 { … … 182 184 } 183 185 184 __attribute__((weak)) 185 void *SYS_brk(void *addr) 186 void *shell_brk(void *addr) 186 187 { 187 188 if (addr == 0) { … … 194 195 } 195 196 196 __attribute__((weak)) 197 void *SYS_mmap2(void *start, size_t length, int prot, int flags, int fd, off_t pgoffset) 197 void *shell_mmap2(void *start, size_t length, int prot, int flags, int fd, off_t pgoffset) 198 198 { 199 199 if (fd != -1) … … 206 206 } 207 207 208 __attribute__((weak)) 209 int SYS_mprotect(void *addr, size_t len, int prot) 208 int shell_mprotect(void *addr, size_t len, int prot) 210 209 { 211 210 //if ((addr >= (void *)&__HeapBase) && (addr + len < (void *)&__HeapLimit)) { … … 216 215 217 216 __attribute__((weak)) 217 long SYS_brk(long a) { 218 return (long)shell_brk((void *)a); 219 } 220 221 __attribute__((weak)) 222 long SYS_mmap2(long a, long b, long c, long d, long e, long f, long g) { 223 return (int)shell_mmap2((void *)a, (size_t)b, (int)c, (int)d, (int)e, ((off_t)f << 32) | (off_t)g); 224 } 225 226 __attribute__((weak)) 227 long SYS_mprotect(long a, long b, long c) { 228 return shell_mprotect((void *)a, (size_t)b, (int)c); 229 } 230 231 __attribute__((weak)) 218 232 long SYS_madvise() 219 233 { … … 235 249 int malloc_lock_sem_count[TNUM_TSKID]; 236 250 251 __attribute__((weak)) 237 252 void __malloc_lock(struct _reent *_r) 238 253 { … … 261 276 } 262 277 278 __attribute__((weak)) 263 279 void __malloc_unlock(struct _reent *_r) 264 280 {
Note:
See TracChangeset
for help on using the changeset viewer.