Ignore:
Timestamp:
May 22, 2019, 4:09:18 PM (5 years ago)
Author:
coas-nagasima
Message:

ファイルディスクリプタ処理を更新

File:
1 edited

Legend:

Unmodified
Added
Removed
  • asp3_tinet_ecnl_arm/trunk/asp3_dcre/mbed/mbed_stub.c

    r377 r387  
    6666#include "t_syslog.h"
    6767
     68extern void musl_start(const char *const args);
     69
    6870int main()
    6971{
     
    182184}
    183185
    184 __attribute__((weak))
    185 void *SYS_brk(void *addr)
     186void *shell_brk(void *addr)
    186187{
    187188        if (addr == 0) {
     
    194195}
    195196
    196 __attribute__((weak))
    197 void *SYS_mmap2(void *start, size_t length, int prot, int flags, int fd, off_t pgoffset)
     197void *shell_mmap2(void *start, size_t length, int prot, int flags, int fd, off_t pgoffset)
    198198{
    199199        if (fd != -1)
     
    206206}
    207207
    208 __attribute__((weak))
    209 int SYS_mprotect(void *addr, size_t len, int prot)
     208int shell_mprotect(void *addr, size_t len, int prot)
    210209{
    211210        //if ((addr >= (void *)&__HeapBase) && (addr + len < (void *)&__HeapLimit)) {
     
    216215
    217216__attribute__((weak))
     217long SYS_brk(long a) {
     218        return (long)shell_brk((void *)a);
     219}
     220
     221__attribute__((weak))
     222long 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))
     227long SYS_mprotect(long a, long b, long c) {
     228        return shell_mprotect((void *)a, (size_t)b, (int)c);
     229}
     230
     231__attribute__((weak))
    218232long SYS_madvise()
    219233{
     
    235249int malloc_lock_sem_count[TNUM_TSKID];
    236250
     251__attribute__((weak))
    237252void __malloc_lock(struct _reent *_r)
    238253{
     
    261276}
    262277
     278__attribute__((weak))
    263279void __malloc_unlock(struct _reent *_r)
    264280{
Note: See TracChangeset for help on using the changeset viewer.